2015-11-07 62 views
-1

下面我有以下代码:您如何使单选按钮文字可点击?

<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拉传送彩色面值défaut”和“Choisissez VOTRE传送彩色” clikable就像单选按钮。而且我还需要通过点击激活颜色选择器来更改单选按钮。

谢谢

回答

0

删除for属性。

没有for属性的标签是其中表单控件的标签。

带有一个的标签是具有匹配ID的元素的标签...并且您没有具有匹配ID的元素。