A variation of the Form helper which doesn't output errors, labels or helptext Wraps form fields (e.g. from Fb) with additional HTML.
This is the code documentation for the SproutCMS project
Search documentation |
class LightweightFormA variation of the Form helper which doesn't output errors, labels or helptext Wraps form fields (e.g. from Fb) with additional HTML.
Extending this class<?php /** * New class description goes here * * @author Your Name, 2024-11-25 **/ class NewClassName extends LightweightForm { /** * Return HTML for a field wrapped in a FIELDSET * * The main wrapping DIV will contain additional classes if the field is required, disabled or has an error. * A class is also output for hte field method name (if the name contains "Sprout\Helpers\Fb::" this is removed) * If the field has an explicit ID set, that will be added as a class on the wrapper too. **/ public function fieldFieldset (callable $method, string $name, array $attrs, array $options) { // Method code goes here } /** * Return HTML for a 'plain' field, i.e. one which doesn't require a FIELDSET wrapped around it. * * The main wrapping DIV will contain additional classes if the field is required, disabled or has an error. * A class is also output for hte field method name (if the name contains "Sprout\Helpers\Fb::" this is removed) * If the field has an explicit ID set, that will be added as a class on the wrapper too. **/ public function fieldPlain (callable $method, string $name, array $attrs, array $options) { // Method code goes here } } ?> |
Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Monday, 3rd April, 2023 at 02:59 pm |