Assign an ID parameter to a form with form_builder library

edited February 2011 in Modules
I'm trying to create a form with the form builder library, and assign and id to the form.
I'm passing some params to the form_builder constructor, but instead of assigning the ID to the form it creates a div with the same id as the param and the class form. Is this correct?
The code is in https://gist.github.com/809316

Thank You!!!

Comments

  • edited 2:58PM
    I can see how that can be confusing. The ID property gets assigned to the containing div or table that is used to render the form. You can set the form ID with the $form_attrs property, so in your case it would be:
    form_attrs' => 'method="post" action="/contenido/save_type" id="content_type_form"',
  • edited 2:58PM
    But the div doesn't wrap the form... The form wraps the div, isn't it?
  • edited 2:58PM
    Yes, you are right. The form tag does wrap the table or divs. What I meant by containing div or table was the html that is used to contain the form fields.
  • edited 2:58PM
    Thank you! I see all clear now...
Sign In or Register to comment.