Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Complex form using fieldset
  • Dear,

    i have to create complex form having 20 fields and css designs between fields, and each fields have separate <div> . is it possible in easy form generation method in fuel using fieldset?

    a tiny example please
  • No, not in Fuel v1, the form template is rather limited. The v2 fieldset supports custom renderers, and support any format you want. You can use that in a v1 app at the moment, but there is no documentation as of yet.

    Using v1, the only option is to pass the fieldset to the view, and either write our your HTML and generate individual fields:

    <div><?php echo $fieldset->build('fieldname'); ?></div>

    or write you're own renderer that generates the HTML, and uses the above method to inject the fieldset fields.

    This way you can still use the population and form validation features of the fieldset.

Howdy, Stranger!

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

In this Discussion