SproutCMS

This is the code documentation for the SproutCMS project

function fieldAuto()

Return HTML for a field, with the wrapping HTML detected automatically.

To enable fieldset wrapping, add the docblock tag @wrap-in-fieldset to the field generation method

Usage

string Form::fieldAuto ( callable $method , string $name , array $attrs , array $options );

Arguments

  1. callable $method
    The actual field rendering method
  2. string $name
    The field name - this is passed to the rendering method
  3. array $attrs
    The field attrs - this is passed to the rendering method
  4. array $options
    The field options - this is passed to the rendering method

Return value

  • string
    HTML