XF 2.0 A question about admin templates...

[xFv]

Well-known member
Hello!
I am trying to use a checkbox with a hidden number selector in my style property.
The only issue with this is that the template I got the code from is an option not a property and I have to try
and get it working in style properties.
Basically I am try to covert it.

The original option code:
Code:
<xf:checkboxrow
    label="{$option.title}"
    hint="{$hintHtml}"
    label="{$option.title}"
    hint="{$hintHtml}"
    html="{$listedHtml}">

    <xf:option name="{$inputName}[check]" selected="$option.option_value.check" label="{{ phrase('check_dnsbl_on_registration') }}" hint="{$option.explain}" data-hide="true"
        label="{{ phrase('require_date_of_birth_and_minimum_age') }}">
        <xf:numberbox name="{$inputName}[minimumAge]" value="{$option.option_value.minimumAge}"
            min="0"
            units="{{ phrase('units_years') }}"
            placeholder="{{ phrase('minimum_age') }}" />

    </xf:option>
</xf:checkboxrow>

My property code trying to convert:
Code:
<xf:checkboxrow
    html="{$listedHtml}"       
    label="{$titleHtml}"
    hint="{$hintHtml}"
    explain="{$property.description}">

    <xf:option name="{$inputName}[check]" selected="{$property.property_value.MY_PROPERTY}" label="{{ phrase('PHRASE_HERE') }}" hint="{$property.explain}" data-hide="true"
        label="{{ phrase('PHRASE_HERE') }}">
        <xf:numberbox name="{$inputName}[amount]" value="{$property.property_value.MY_PROPERTY}"
            min="1"
            max="500"     
            units="{{ phrase('PHRASE_HERE') }}"
            placeholder="{{ phrase('PHRASE_HERE') }}" />

    </xf:option>
</xf:checkboxrow>

A couple questions...
1: is it even possible first of all?
2: Am I doing this correctly by changing the option for the property values?
Thank You.

***EDIT*** I have it working! Her is the code I used.
Code:
<xf:checkboxrow rowclass="{$rowClass}"
    explain="{$property.description}"
    hint="{$hintHtml}">
    
    <xf:option name="{$formBaseKey}[xfv_fm_enable]" selected="{$property.property_value.xfv_fm_enable}" data-hide="true"
        label="{{ phrase('xfv_founding_members_enable') }}">
        <xf:numberbox name="{$formBaseKey}[amount]" value="{$property.property_value.amount}"
            min="1"
            max="500"         
            units="{{ phrase('xfv_amout_founding_members') }}" />

    </xf:option>   
</xf:checkboxrow>
.
 
Last edited:
Top Bottom