Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Setting form attribute through fieldset class
  • In the docs, it says that form attributes can set by:
    $fieldset->form->set_attribute('id', 'edit_article_form');
    Aside from the fact that I think it should be ->form() not ->form, when I try this, the id is not printed. Here's my code in the controller:
    $fieldset = Fieldset::forge('form_artwork_status')->add_model('Model_Martwork', $art_status, 'set_form_fields_artwork_status');
    $fieldset->form()->set_attribute('id', 'form-artwork');

    Here's my form in the view:
    echo $fieldset->form()->open(array('enctype' => 'multipart/form-data'));

    What am I missing?

Howdy, Stranger!

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