Hi,
I would like to use the If snippet to check if a checkbox has been ticked on the template, and if so, display a chunk with a dropdown selector.
I am trying this:
[[!If
&subject=`[[*widefit]]`
&operator=`=`
&operand=`yes`
&then=`[[$dropselectorwide]]`
&else=``
]]
My TV widefit is input type: checkbox, input option values yes, output type default.
Dropselectorwide is a chunk with the following code:
<label class="label_left">Normal or Wide fit?</label>
<select size="1" class="itemselect" name="normalorwide">
<option value="Normal Fit">Normal Fit</option>
<option value="Wide Fit">Wide Fit</option>
</select>
Any ideas what i am doing wrong in the if call?
thanks,
Rachel
Have you tried something like:
[[*widefit:is=``:then=``:else=`[[$dropselectorwide]]`]]
lo9on.com
MODx Evolution/Revolution | Remote Desktop Training | Development
you forgot the ’?’ after If
[[!If?
&subject=`[[*widefit]]`
&operator=`=`
&operand=`yes`
&then=`[[$dropselectorwide]]`
&else=``
]]
Thanks so much - it was the missing ? (so simple!) and now it works