Created
October 11, 2011 09:48
-
-
Save Savageman/1277723 to your computer and use it in GitHub Desktop.
Fuel form : build fields
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
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