How to use a Password Unit?

Jaxel

Well-known member
When you create an option in XF, it gives you a dropdown of edit formats. There is a "Text Box" option, but not one for passwords. Looking in the compiler classes though, a password unit helper does in fact exist.

How do I make a password box option?
 
Set the format to Named Template, create an admin template and reference that in the Format Parameters.

The admin template could look something like this:

Code:
            <xen:passwordunit label="{$preparedOption.title}" name="{$fieldPrefix}[{$preparedOption.option_id}]">
                <xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
                <xen:html>
                    <input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
                    {xen:raw $editLink}
                </xen:html>
            </xen:passwordunit>
 
Back
Top Bottom