Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

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 4:31AM
    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 4:31AM
    But the div doesn't wrap the form... The form wraps the div, isn't it?
  • edited 4:31AM
    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 4:31AM
    Thank you! I see all clear now...
Sign In or Register to comment.