\BootstrapForm
Builds a form that renders {@link FormField} objects using templates that are compatible with Twitter Bootstrap.
Extra methods are decorated on to the objects and their subclasses to support special features
of the framework.
- Author: Uncle Cheese <unclecheese@leftandmain.com>
Synopsis
class BootstrapForm
extends Form
{
- // members
- protected string $template = "BootstrapForm";
- protected string $formLayout = "vertical";
- protected String $gridLabelClass = "col-sm-3";
- protected String $gridInputClass = "col-sm-9";
- protected String $gridActionClass = "col-sm-offset-3 col-sm-9";
- // methods
- public static void set_bootstrap_included()
- public static void set_jquery_included()
- public static void set_bootstrap_form_included()
- public BootstrapForm applyBootstrap()
- public BootstrapForm setLayout()
- public BootstrapForm setGridLabelClass()
- public BootstrapForm setGridInputClass()
- public BootstrapForm setGridActionClass()
- public BootstrapForm addWell()
- public string forTemplate()
Hierarchy
Extends
- Form
Tasks
Line | Task |
---|---|
116+ | Add template support for "inline" |
Members
protected
Methods
public
- addWell() — Adds a "well," or sunken background and border, to the form
- applyBootstrap() — Applies the Bootstrap transformation to the fields and actiosn of the form
- forTemplate() — Includes the dependency if necessary, applies the Bootstrap templates, and renders the form HTML output
- setGridActionClass() — Sets the desired Action Grid Class of the form. Options include: - "col-sm-offset-3 col-sm-9" (default) - "col-sm-offset-2 col-sm-10" etc..
- setGridInputClass() — Sets the desired Input Grid Class of the form. Options include: - "col-sm-9" (default) - "col-sm-8" etc..
- setGridLabelClass() — Sets the desired label Grid Class of the form. Options include: - "col-sm-3" (default) - "col-sm-4" etc..
- setLayout() — Sets the desired layout of the form. Options include: - "vertical" (default) - "horizontal" - "inline" - "search"
- set_bootstrap_form_included() — Sets form to disable/enable inclusion of bootstrap forms js
- set_bootstrap_included() — Sets form to disable/enable inclusion of Bootstrap CSS
- set_jquery_included() — Sets form to disable/enable inclusion of jQuery