tenants
Well-known member
Hi there, I'm trying to create my own admin template with 2 options (on the same line, as they relate to each other)
 
1) a select box (greater, lesser, equal)
2) a spin box (1-x)
 
I've greated the correct "look", but havent figured out how to make sure the values persist
 
The "look" is as show here:
 

 
my sub options I've included are here:

 
and the admin template is as follows:
 
	
	
	
		
 
It was just a guess, but I thought the Array Sub Options would be used in the template as:
{$fieldPrefix}[{$preparedOption.option_id}][operator] & {$preparedOption.option_id}][value] and that these would be saved out using
<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
 
I still need to add a selected statement for each of the select (operator) options, but so far just for the spin box the parameter [value] isn't persisting.
 
What do I need to add / do for these parameters (operator, value) to persist?
				
			1) a select box (greater, lesser, equal)
2) a spin box (1-x)
I've greated the correct "look", but havent figured out how to make sure the values persist
The "look" is as show here:

my sub options I've included are here:

and the admin template is as follows:
		Code:
	
	<xen:controlunit label="{$preparedOption.title}"
hint="{$preparedOption.hint}">
    <xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
    <xen:html>
        <xen:select name="{$fieldPrefix}[{$preparedOption.option_id}][operator]"  inputclass="autoSize">
            <xen:option value=">" > > </xen:option>
            <xen:option value="<"> < </xen:option>
            <xen:option value="="> = </xen:option>
        </xen:select>
        -
        <xen:spinbox name="{$fieldPrefix}[{$preparedOption.option_id}][value]" value="{$fieldPrefix}[{$preparedOption.option_id}][value]" inputclass="number" min="0" step="1" />
        <input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
        {xen:raw $editLink}
    </xen:html>
</xen:controlunit>It was just a guess, but I thought the Array Sub Options would be used in the template as:
{$fieldPrefix}[{$preparedOption.option_id}][operator] & {$preparedOption.option_id}][value] and that these would be saved out using
<input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
I still need to add a selected statement for each of the select (operator) options, but so far just for the spin box the parameter [value] isn't persisting.
What do I need to add / do for these parameters (operator, value) to persist?
