func option of dependent field
Hi could it be possible to give me an example of the func option on a dependent field as im struggling to see how this works or what is sent to it. What im trying to do is get the dependent field to return a template or block containing a form which contains fields from another table these values will then be saved as a serialized field. i will be building up the template based on the id of the dependent field id.
Comments
// A function perhaps in you fuel/application/helpers/my_helper.php function my_func($params) { // your custom field code goes here } // Then in your form code $fields['myfield'] = array('type' => 'dependent', 'func' => 'my_func');
However, what it sounds like you are wanting to do is similar to using a "block" field that uses block layouts that perhaps contains a "template" field type:
http://docs.getfuelcms.com/general/forms#block
http://docs.getfuelcms.com/general/layouts#layouts_block_layouts
http://docs.getfuelcms.com/general/forms#template