Valid labels

jrthor2 12 Sep, 2012
Is it possible to make the <label> tag valid html, and add the "for" attribute so that when you click on the label, it places the cursor in the appropriate field? I'm using version 4 by the way.

Thanks!
Max_admin 12 Sep, 2012
Hi,

Did you try to set a field id to your field ?

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jrthor2 12 Sep, 2012
ah, that worked like a charm. I guess I wasn't sure what that was for, as there is no description as to what exactly all the fields are on the screen.

Anyways, thanks for the help!!
GreyHead 12 Sep, 2012
Hi jrthor2,

The 'ID' (and 'name') are standard HTML attributes. ChronoForms mostly uses the 'name' attribute. The ID is a unique identifier (names don't need to be unique) that is mostly useful when you add JavaScript to your form; but it's also used by the 'for' attribute in the label.

I think that ChronoForms assumes that if you didn't set an ID then you didn't want the 'for' attribute added.

Bob

PS ChronoForms does add ID attributes in some cases but they are random strings that change each time the form is loaded so are of limited use.



Bob
This topic is locked and no more replies can be posted.