我在下面有以下代码:
<div class="customisation-color-options">
{foreach from=$group.attributes key=id_attribute item=group_attribute}
<div class="customisation-custom-color radio">
<label for="default-color">
<input type="radio" class="attribute_radio not_unifrom" name="{$groupName|escape:'html':'UTF-8'}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} />
<span>
{if $id_attribute == 25}
Utilisez la couleur par défaut
{else}
{$group_attribute|escape:'html':'UTF-8'}
{/if}
</span>
</label>
{if $id_attribute == 26}
<input type='text' id="custom-color-picker" class="not_unifrom"/>
{/if}
</div>
{/foreach}
</div>
我想让单词“Utilisez la couleurpardéfaut”和“Choisissez votre couleur”就像单选按钮一样clikable。一旦通过点击激活了颜色选择器,我还需要它来更改单选按钮。
谢谢
答案 0 :(得分:0)
删除for
属性。
没有for
属性的标签是其中的表单控件的标签。
带有一个标签的标签是具有匹配ID的元素的标签...并且您没有具有匹配ID的元素。