SproutCMS

This is the code documentation for the SproutCMS project

class LightweightForm

A 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-05-01
**/
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 &quot;Sprout\Helpers\Fb::&quot; 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 &quot;Sprout\Helpers\Fb::&quot; 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
    }
    
}
?>