Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Multipart form-data with Fieldsets
  • Hey,
    I would create an uploads form using Fieldsets with something like this code :
    $upl_classic = \Fieldset::factory();
    $upl_classic
     ->add('files', 'Files', array('type' => 'file'))
     ->add('submit', '', array('type' => 'submit', 'value' => 'Upload'));
      
    $view->upload_classic = $upl_classic->build();
    

    Where I can specify that form has an enctype "multipart/form-data" ??
  • The enctype is part of the attributes for the form, thus it would be $fieldset->set_config('form_attributes', array('enctype' => 'multipart/form-data'));
  • Perfect ...thank you!

Howdy, Stranger!

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

In this Discussion