HowTo Add a class to a label in a form
Hello community,
i want to make some changes in my form,
what i want to do is add a class to my label in a form.
look at the code below. (thiss is original)
Code:
<label for="ctrl_1" class="mandatory"><span class="invisible">Mandatory field</span> Naam<span class="mandatory">*</span></label>
Code:
<label for="ctrl_1">Naam</label>
this is wat i want it to be :
Code:
<label for="ctrl_1" class="mandatory extra_class"><span class="invisible">Mandatory field</span> Naam<span class="mandatory">*</span></label>
Code:
<label for="ctrl_1" class="extra_class" >Naam</label>
is there a way to do this?
much thanks Tieme
Re: HowTo Add a class to a label in a form
in the form field configuration under "expert settings" there is a "css class" field
http://goo.gl/OQ8He
Re: HowTo Add a class to a label in a form
Quote:
Originally Posted by ga.n
in the form field configuration under "expert settings" there is a "css class" field
http://goo.gl/OQ8He
thanks for the reply,
i only have one problem when i do that.
that is that there is not only at label a extra_class but at input also.
and i dont want to add a class to input.
so anyone does anyone know where i can find the file's i need to edith to do this?
much thanks.
Tieme
Re: HowTo Add a class to a label in a form
Quote:
Originally Posted by Tieme
Quote:
Originally Posted by ga.n
in the form field configuration under "expert settings" there is a "css class" field
http://goo.gl/OQ8He
thanks for the reply,
i only have one problem when i do that.
that is that there is not only at label a extra_class but at input also.
and i dont want to add a class to input.
so anyone does anyone know where i can find the file's i need to edith to do this?
much thanks.
Tieme
why do not you just solve the problem through css?
you can use "label.extra_class" instead of ".extra_class" as selector so the input will not be affected ;-)
Re: HowTo Add a class to a label in a form
oke that problem is solved,
sorry i was totaly forgot that css function :oops:
but than i have a nother question only this is not CSS but HTML format of the Form,
is thare a way to replace with
Code:
placeholder="some text"
or is ther a simple way to add this to de form?
much thanks.
Tieme
Re: HowTo Add a class to a label in a form
problem solved,
there's a extention calld cleardefault i'v installd that and problem is solved.,
Re: HowTo Add a class to a label in a form
You can style label like that
label[for="ctrl_1"]{
css
}
It's not dynamic way, but is a way :)