SproutCMS

This is the code documentation for the SproutCMS project

function title()

Generates the title for a field, possibly enclosing it in a label, possibly with a generated ID

Usage

This function is deprecated
This method is likely to be removed at any given moment. Please use Form::nextFieldDetails instead.

Arguments

  1. string $title
    The title of the field
  2. string|null $id = ''
    The id to use. Empty string to auto-generate an id; false to disable the enclosing label,
           e.g. for a field which needs multiple inputs (such as a datepicker). The id will be used on the next
           input to be generated.

Return value

  • string
    Possibly a LABEL element, or otherwise HTML text