\BootstrapFormField

The base class for creating a {@link FormField} object that is compatible with the Twitter Bootstrap CSS framework.

Synopsis

class BootstrapFormField extends DataExtension {
}

Hierarchy

Extends

  • DataExtension

Tasks

Line Task
245+ allow setting error message as inline

Members

protected

  • $gridInputClassString
    The input grid class for the bootstrap 3 horizontal form overrides form setting
  • $gridLabelClassString
    The label grid class for the bootstrap 3 horizontal form overrides form setting
  • $holderAttributes — array
  • $holderClasses
  • $inputClasses
  • $labelClasses

Methods

private

  • loadErrorMessage() — checks for error messages in owner form field adds error class to holder and loads error message as helptext

public

  • BootstrapLayout() — returns the bootstrap Layout to be used in templates
  • GridInputClass() — returns Grid input class to be used in templates
  • GridLabelClass() — returns Grid label class to be used in templates
  • HolderAttributes() — Returns the list of attributes suitable for an HTML tag
  • HolderClasses() — returns the holder classes to be used in templates also triggers checking for error messages
  • InputClasses() — returns the input classes to be used in templates also triggers checking for error messages
  • LabelClasses() — returns the label classes to be used in templates also triggers checking for error messages
  • addHelpText() — Adds a block of help text to the form field. (HTML safe).
  • addHolderClass() — Allows adding custom classes to the holder
  • addInlineHelpText() — Adds a line of inline help text to a form field (HTML safe).
  • addInputClass() — Allows adding custom classes to the input
  • addLabelClass() — Allows adding custom classes to the label
  • addPlaceholder() — Adds a HTML5 placeholder attribute to the form field
  • onBeforeRender() — Adds the form-control class to *just* the formfield, not the holder.
  • setGridInputClass() — Allows setting custom Grid input class to override from grid label class
  • setGridLabelClass() — Allows setting custom Grid label class to override from grid label class
  • setHolderAttribute() — Sets an attribute on the wrapper <div> for the formfield