nocte
Well-known member
I want to change this code in the
I want to add another option and if that option is chosen, I want to show some dependent inputs.
With an radio element i could do this easily with
Any ideas?
account_privacy
template:
HTML:
<xf:macro name="privacy_option" arg-user="!" arg-name="!" arg-label="!" arg-hideEveryone="{{ false }}" arg-hideFollowed="{{ false }}">
<dl class="inputLabelPair">
<dt>{$label}</dt>
<dd>
<xf:select name="privacy[{$name}]" value="{$user.Privacy.{$name}}">
<xf:if is="!$hideEveryone">
<xf:option value="everyone">{{ phrase('all_visitors') }}</xf:option>
</xf:if>
<xf:option value="members">{{ phrase('members_only') }}</xf:option>
<xf:if is="!$hideFollowed">
<xf:option value="followed">{{ phrase('people_you_follow') }}</xf:option>
</xf:if>
<xf:option value="none">{{ phrase('nobody') }}</xf:option>
</xf:select>
</dd>
</dl>
</xf:macro>
With an radio element i could do this easily with
<xf:dependent>My inputs</xf:dependent>
inside an <xf:option>
element. But this does not work with selects (i get an template error while saving). Any ideas?