Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
A few questions regarding
  • Hi.

    I have recently began using FUELPHP. It's great, however I have a few questions.

    1 - I don't know how to set a class/id for a table (and rows etc) in a fieldset. I know how to set a class for the entire fieldset:
    $fieldset = Fieldset::forge('contact', array('form_attributes' => array('class' => 'contact_form')));
    , but not the table and rows etc inside it.

    2 - I don't know how to reverse the array in an array object (similar to 'array_reverse') retrieved from a db query.

    Thank you very much.
  • Harro VertonHarro Verton
    Accepted Answer
    By default, Fieldset uses the form.php config file for the form generation templates. They are documented here: https://fuelphp.com/docs/classes/fieldset/fieldset.html#/form_attributes

    Alternatively, you can pass a config array to Fieldset::forge(), which can be used to override the defaults, and have custom templates per Fieldset object.

    What do you mean by "array object"? If you mean a database result object, the short answer is you can't. Add ORDER BY clauses to make sure the result is in the correct order.


Howdy, Stranger!

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

In this Discussion