Answer the question
In order to leave comments, you need to log in
How to add value to label?
hello, please tell me how to be in such a situation for styling inputs?
{if $pe_settings[$fieldset].use_free}<div><input type="radio" name="price_type" id="price_type" value="2" {if isset($tmp.price) && $tmp.price==0}checked="checked"{/if} /> {$pe_settings[$fieldset].lang[$crt_lang].free}</div>{/if}
{if $pe_settings[$fieldset].use_tags}
{foreach $pe_settings[$fieldset].lang[$crt_lang].tags_array as $tag}
<div><input type="radio" name="price_type" id="price_type" value="{$tag}" {if isset($tmp.price) && $tmp.price==-1 && ( isset($tmp.price_tag) && $tmp.price_tag==$tag)}checked="checked"{/if}/> {$tag}</div>
{/foreach}
{/if}
Answer the question
In order to leave comments, you need to log in
The global id attribute defines a unique identifier (ID) that must be unique throughout the document.
Use other attributes like class or data-*
https://developer.mozilla.org/en-US/docs/Web/HTML/...
I don't see the label
tag . If it is inside the loop, then you can put the input inside the label.
Something like
<label>
<input type="radio" />
<span></span>
</label>
label {
position: relative;
}
label span { /* Стиль неактивного баттона */ }
label :checked ~ span { /* Стиль отмеченного радиобаттона */ }
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question