Look at the fuel/application/config/MY_fuel_layouts.php file and then in that file the $config['layouts']['main'] array used to create the main layout fields.
I have now added some fieldsets to my module... but how can I set the form elements in relation to the fieldset? Now all my elements are at the top of the page and at the bottom there is the tabstrip with the fieldsets...
Hmmm and already the next question... perhaps just did not find it in the docs... I have an enum/select and I want to define a default value... but when I edit the entry the default should be overwritten with the database value. I did not achieve this so far...
Enums will look at the default value of an enum field if it is a brand new record for the initial value and select that. If you don't want a value at all that you specify the null parameter to be true like so: 'null' => true,
1. Use the "after_html" parameter on the field to create the additional HTML for the second field.
$value = (isset($values['field2'])) ? $values['field2'] : '';
<code>$fields['my_field']['after_html'] = '<input type="text" value="'.$value.'">'; 2. Create a field of type custom that has a rendering callback function: http://docs.getfuelcms.com/general/forms#custom 3. Create a custom field type (a little more involved): http://docs.getfuelcms.com/general/forms#association_parameters
hmmm ok... thought there would be a simpler way... both fields are database fields of the module... Think I will just put them each in one row... it's too bad because in one row it would look much better.
Comments
http://docs.getfuelcms.com/general/forms#fieldset
http://docs.getfuelcms.com/general/forms#section
do you have an example how to add the subelements to the fieldset type?
According to your comment with the main layout... That is for the frontend files, but I am in the backend side.
perhaps just did not find it in the docs...
I have an enum/select and I want to define a default value... but when I edit the entry the default should be overwritten with the database value.
I did not achieve this so far...
'null' => true,
next question for form view...
How can I use the form builder to display 2 form fields in the same row with one label.
So that as result I have something like:
Datum, Uhrzeit (Beginn): "field1" "field2"
1. Use the "after_html" parameter on the field to create the additional HTML for the second field.
$value = (isset($values['field2'])) ? $values['field2'] : ''; <code>$fields['my_field']['after_html'] = '<input type="text" value="'.$value.'">';
2. Create a field of type custom that has a rendering callback function:
http://docs.getfuelcms.com/general/forms#custom
3. Create a custom field type (a little more involved):
http://docs.getfuelcms.com/general/forms#association_parameters