Form module render method
  • The default render method for the Form module seems to be 'table' - is it possible to use the config file to change that to 'div'?
  • I suppose you could create a form_builder.php config file and add the following:
    $config['render_format'] = 'div';
    However, that would change it globally and would likely make the admin area a mess. What areas are you needing it as a div? If it's in a module's form, there is a special field key you can use to specify Form Builder options:
    $fields['__FORM_BUILDER__']['render_format'] = 'div';
  • Front end I always prefer divs - conceptually it's easier to extend Bootstrap sass to divs than table elements. Although, having written that, I don't think I've ever tried...!

    Client would like to use Form module in CMS pages, so it is there, in front end layouts, that I'd prefer divs.
  • I got what I wanted by extending Fuel_forms(), and adding a new Fuel_form() function render_divs()

    I can then inject Bootstrap styles into the form fields (row_class=form-group, class=form-control) - Sass extensions only get you so far.

Howdy, Stranger!

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