Create a gist now

Instantly share code, notes, and snippets.

Fuel form : build fields
class Form extends \Fuel\Core\Form {
public function field_template_public($build_field, \Fuel\Core\Fieldset_Field $field, $required) {
return parent::field_template($build_field, $field, $required);
public function build_field($field) {
if (substr(strtolower(\Inflector::denamespace(get_class($field))), 0, 6) == 'widget') {
// Widgets build themselves
return $field->build();
return parent::build_field($field);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment