Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Fieldset Class does not add id to form tag
  • I'm (involuntary) using the Fieldset class to generate a form:

    $fieldset = \Fieldset::forge('logins', array('id' => 'wzda_login_form'));
    $fieldset->set_config('id', 'wzda_login_form');
    ...//and adding some inputs

    now this does not generate a id in the <form> tag, and i have tried a bunch of things to fix that but i can't seem to find what it takes to get it done.

    i haven't changed anythign in my form config:

     'form_template'         => "\n\t\t{open}\n\t\t<div class='form'><div class='fields'>\n{fields}\n\t\t</div></div>\n\t\t{close}\n",
      'fieldset_template'     => "\n\t\t<tr><td colspan=\"2\">{open}<table>\n{fields}</table></td></tr>\n\t\t{close}\n",

    any ideas?
  • of course! as soon as i post this question i find the solution...

    geez.

    $fieldset = Fieldset::forge('article', array(
    'form_attributes' => array(
    'id' => 'edit_article_form',
    'name' => 'edit_article'
    )
    )
    );
  • lol. I like questions that are solved before I can reply... :-)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion