Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How to Decorate Fieldset genereted forms
  • I am using Fieldset to make forms.

    I need to decorate the forms which are generated by the fieldset. right now it has default look. I need to change it to something like this http://screencast.com/t/fuP2AsTcibb

    I know that zend framework has some hing called decorator. How do i do the same in fuelphp
  • Fuel currently doesn't have that. A refactor is planned for version 2.

    To style your fieldset, first create the desired template in your form.php config file. Copy it over from fuel/core/config to app/config before making changes.

    Once your HTML template is ok, use CSS to do the rest of the styling.

    If your pages are so complex or special that no generic form layout will do, you can create the form layout in your view, and use

    echo $fieldset->field('fieldname')->build);

    to generate individual form fields. If you go this route, you might want to strip some of the template to have a raw input field generated.

Howdy, Stranger!

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

In this Discussion