Forum OpenACS Q&A: Re: HTML id attribute in formwidget output

Collapse
Posted by Demon Cypher on
Hi,
if you are looking for some thing like this

input type="text" name="test" id="test"

than use the html option in the widget

ad_form -form {
{test:text(text) {label "test"} {html "id test"}}
}

hope that helps..

Collapse
Posted by Alexandre Simard on
Thanks. I know this could work, but it would require me to add the html parameter to all my form elements in ad_form, strictly for presentation purposes. It's not clean.

What I would like is something like what the FORMGROUP tag does, where @formgroup.widget will print an <OPTION> or <INPUT TYPE="radio"> with an auto-generated ID of the following format: @elements.form_id@:elements:@elements.id@:mailto:\@formgroup.option@

Why couldn't the standard FORMWIDGET tag do something similar for other form inputs?