UG - form_builder

edited December 2010 in Bug Reports
http://www.getfuelcms.com/user_guide/libraries/form_builder

All the function references are for $this->form->a_function() but the examples show (and it is) $this->form_builder->a_function()

Could be confusing for people not familiar with CI's loader...


And perhaps and example of how to set an attribute instead of just the fields?

Like:

$this->form_builder->required_text = '* Mandatory fields';

May not be obvious for some?

Comments

  • edited 8:06AM
    Yeah indeed it wasn't obvious to a newbie like me.
    Is the code below correct Lance ?
    $this->form_builder->form_attrs = array('method' => 'get', 'action' => 'submit');
  • edited December 2010
    That's (one of) the correct ways to use the form_attrs var yeah. Could be as a string as the UG points out.

    Action should be a destination url though.

    It'll render something like:

    <form method="get" action="my_processor.php">

    Can use site_url() in there if you want to as well.
Sign In or Register to comment.