Ok whenever I use the Fieldset class, it uses table's... well I hate table's because they are very ugly.
I researched into the Fieldset AND Form class that comes installed with FuelPHP...
HOW do you convert the table's into div's??
Is there some sort of template I'm not seeing? I'm not seeing where they are populating the td's and tr's and whatever.. I want to switch those to DIV's..
Well it's impossible to edit it the way I would like it since I would like two fields to be within a row.. just not possible with the way they have it set up.. but oh well. :/
Maybe I'll just setup my own custom form and not use the Fieldset or Form classes.
If that's what you want, that's what you should ask. I can't see what it is you want to achieve.
You don't have to generate the entire form at once, as you have discovered that there are limits to what you can do with a form-wide template.
You can use $fieldset->build('fieldname') to generate the form field for the variable 'fieldname'. This way you can create the markup for the view manually in the view, including Form::open() and Form::close(), and still use the fieldset to generate the fields (so you can use features like validation).
I'm not that great with FuelPHP yet so I have no idea on how I would go about doing that. I took a tutorial to get where I am right now. I've done a lot of research in these classes since I"ve been totally stumped with the markup.. But I'll see if I can figure it out.. I just hope I don't mess things up.
Don't hesitate to ask, we're here to help if you get stuck.
If you use build() on individual fieldset fields, the form_method and form_template fields in the template are not used, the others you can strip or change as much as you want to suit your needs.
Don't forget to copy the file from core/config to app/config before you make changes.
I edited my post before your most recent one with some of the code in my controller to generate the form from my model.. but it's generating the entire form still even when I specify which field I want to build and what variable I want to set it at in the view.
In your code you do $form->build(), which generates the entire form.
If you want more granular control, pass $form on to your view. In your view, create the HTML markup for your form manually. Then, insert the individial fields, like so:
Wow thank you so much. :) Should my validation stay the same when the form submits if I was using it the other way? How it is in my controller. Would that still stand correctly?