Hi,
We're presently making a table-less, XHTML/CSS compliant form template.
We want to use the FOR attribute in the LABEL tag to reference INPUT elements. So I have this line:
<label for="@elements.form_id@:elements:@elements.id@">@elements.label;noquote@</label>
The FOR attribute is very long on purpose, to avoid any ID name clashes in the HTML page.
Now, for the label to be useful (i.e. you can click on them and the referenced INPUT gains focus), the INPUT has to have the same ID as the label's FOR attribute. Unfortunately, the FORMWIDGET template tag does not add an ID attribute to its output. Adding the ID attribute to the FORMWIDGET is not an option, as it is already used to reference the tcl form element.
So, is there a "magic" attribute to FORMWIDGET that will translated to a simple ID attribute in the generated HTML or do I need to hack the widget procs to add such a thing myself?
Thanks!