CustomHtmlForm\Forms\CustomHtmlFormStep
Provides multipage functionality for CustomHtmlForms
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class CustomHtmlFormStep
extends CustomHtmlForm
{
- // Inherited members from CustomHtmlForm
- protected bool $injectedSpecialFormFields;
- protected bool $updatedFormFields;
- public static array $useSpamCheck;
- public static boolean $use_google_recaptcha;
- protected boolean $useCustomTabIndex;
- protected integer $highestTabIndex;
- public static array $customTabIndexForms;
- protected bool $excludeFromCache;
- public static bool $cache_enabled;
- protected Controller $controller;
- protected array $formFields;
- public $fieldGroups;
- protected $SSformFields;
- public $class;
- protected $name;
- protected $jsName;
- protected array $errorMessages;
- protected array $messages;
- protected ArrayList $messagesForTemplate;
- protected array $customParameters;
- protected array $basePreferences;
- protected array $preferences;
- protected array $noValidationFields;
- public static array $classInstanceCounter;
- public static array $registeredModules;
- public static array $registeredThemes;
- protected array $registeredCustomHtmlForms;
- protected boolean $securityTokenEnabled;
- protected bool $submitSuccess;
- public static array $registeredFormFieldHandlers;
- protected static Zend_Cache_Core $cache;
- protected $cacheKey;
- protected string $cacheKeyExtension;
- protected $form;
- protected bool $barebone;
- protected $customHtmlFormAction;
- public static string $custom_error_box_css_class;
- public static string $custom_error_box_sub_selector;
- public static string $custom_error_box_selection_method;
- // methods
- public string getStepTitle()
- public boolean getStepIsVisible()
- public bool getIsConditionalStep()
- public bool getIsCurrentStep()
- public bool isStepCompleted()
- public bool isPreviousStepCompleted()
- public boolean isLastStep()
- public string CustomHtmlFormInitOutput()
- public int getStepNr()
- public int getVisibleStepNr()
- protected bool getShowCustomHtmlFormStepNavigation()
- // Inherited methods from CustomHtmlForm
- public CustomHtmlForm __construct()
- public void preferences()
- public void extendedProcess()
- public static void registerModule()
- public static void registerTheme()
- public string RequiredFieldMarker()
- public string getJavascriptFieldInitialisations()
- public array getJavascriptValidatorInitialisation()
- public void setFormField()
- public void setFormFieldValue()
- protected void fillInFieldValues()
- protected void fillInRequestValues()
- protected string getFormFieldValueLabel()
- public ViewableData submit()
- public ViewableData submitFailure()
- protected mixed submitSuccess()
- public array getFormData()
- protected void checkFormData()
- protected array getForm()
- public mixed getFormFieldDefinition()
- protected void addRequiredFieldParams()
- public Field getFormField()
- protected string buildFormAction()
- public string getCustomHtmlFormName()
- public array getFormFields()
- public void injectSpecialFormFields()
- public static void useSpamCheckFor()
- public bool useCustomTabIndex()
- public void setUseCustomTabIndex()
- public bool getUseCustomTabIndex()
- public void addMessage()
- public ArrayList getMessagesForTemplate()
- public bool HasMessagesForTemplate()
- public void addErrorMessage()
- public CustomHtmlForm|bool getRegisteredCustomHtmlForm()
- public static mixed getRegisteredFormFieldHandlerForType()
- public string getSecurityID()
- public string CustomHtmlFormMetadata()
- public bool CustomHtmlFormFieldGroupExists()
- public string CustomHtmlFormFieldsByGroup()
- public string CustomHtmlFormSpecialFields()
- public string SpamCheckField()
- public string CustomHtmlFormFieldByName()
- public FormField customDataFieldByName()
- public string CustomHtmlFormErrorMessages()
- public boolean HasCustomHtmlFormErrorMessages()
- public string FormName()
- public CustomHtmlForm InsertCustomHtmlForm()
- public void registerCustomHtmlForm()
- public static void registerFormFieldHandler()
- public void setSecurityTokenDisabled()
- public void deactivateValidationFor()
- public void activateValidationFor()
- public mixed getPreference()
- protected string getSubmitButtontitle()
- protected string getSubmitButtonToolTip()
- public array getLoadShoppingCartModules()
- public array getCreateShoppingCartForms()
- protected bool getDoJsValidation()
- protected bool getDoJsValidationScrolling()
- protected bool getFillInRequestValues()
- protected bool getShowJsValidationErrorMessages()
- protected string getSubmitAction()
- protected void addFieldToGroup()
- protected ContentController getFormController()
- public bool getSubmitSuccess()
- public void setSubmitSuccess()
- public void setCustomParameters()
- public array getCustomParameters()
- public void setCustomParameter()
- public void buildCacheKey()
- public string getCacheKey()
- public string getCacheKeyExtension()
- public void setCacheKeyExtension()
- public string hasCacheKeyExtension()
- public static CacheInterface getCache()
- public void setCachedFormOutput()
- public string getCachedFormOutput()
- public static void disableCache()
- public static void enableCache()
- public array createFieldDefinition()
- public array createHiddenFieldDefinition()
- public array createTextFieldDefinition()
- public array createTextareaFieldDefinition()
- public array createCheckboxFieldDefinition()
- public array createDropdownFieldDefinition()
- public array createTreeDropdownFieldDefinition()
- public array createTreeMultiselectFieldDefinition()
- public array createMoneyFieldDefinition()
- public array createCheckboxSetFieldDefinition()
Hierarchy
Members
protected
- $SSformFields
—
array
contains the form fields prepared for sapphire - $barebone
—
CustomHtmlForm\Forms\bool
Indicates whether the form is called in barebone mode - $basePreferences
—
array
the forms preferences; can be overwritten in the instance - $cache
—
CustomHtmlForm\Forms\Zend_Cache_Core
CuzstomHtmlForm Cache object - $cacheKey
—
string
Cache key for this form - $cacheKeyExtension
—
string
Cache key extension for this form - $controller
—
SilverStripe\Control\Controller
saves controller of calling class - $customHtmlFormAction
—
string
Custom form action to use for this form. - $customParameters
—
array
Contains an associative array with values that are passed to the form as hidden fields. These values will not be validated, they only contain data for control and evaluation. - $errorMessages
—
array
contains the error message for a form field - $excludeFromCache
—
CustomHtmlForm\Forms\bool
Set to true to exclude this form from caching. - $form
—
array
Form fields and actions - $formFields
—
array
contains form definitions of form fields - $highestTabIndex
—
array
Holds the highest tab index - $injectedSpecialFormFields
—
CustomHtmlForm\Forms\bool
Indicator to check whether the special form fields are already injected - $jsName
—
string
name of the objects which should be used for the JS validators - $messages
—
array
contains the messages for a form - $messagesForTemplate
—
SilverStripe\ORM\ArrayList
contains the messages for a form to display in template - $name
—
string
the objects name - $noValidationFields
—
array
Contains fields that shall not be validated. - $preferences
—
array
Contains custom preferences that can be set in the form object. - $registeredCustomHtmlForms
—
array
Contains a list of registerd custom html forms - $securityTokenEnabled
—
boolean
Don't enable Security token for this type of form because we'll run into caching problems when using it. - $submitSuccess
—
CustomHtmlForm\Forms\bool
indicates whether there is an succeeded submission or not - $updatedFormFields
—
CustomHtmlForm\Forms\bool
Indicator to check whether the form fields are already updated by extensions - $useCustomTabIndex
—
array
Set to true to use a custom tabindex order for the forms fields
public
- $cache_enabled
—
CustomHtmlForm\Forms\bool
Determines whether the CustomHtmlForm file cache is enabled or not - $class
—
string
the objects class name - $classInstanceCounter
—
array
Instances of $this will have a unique ID - $customTabIndexForms
—
int
Holds the forms using custom tabindexes - $custom_error_box_css_class
—
string
Custom CSS class to use for JS error messages. - $custom_error_box_selection_method
—
string
Allowed values: append prepend - $custom_error_box_sub_selector
—
string
CSS selector (child of #FieldID) to place the error messages box. - $fieldGroups
—
array
contains groups in which fields can be collected - $registeredFormFieldHandlers
—
array
Contains all registered form field handlers. - $registeredModules
—
array
Contains the registered modules. This list is used by all methods that fetch templates. - $registeredThemes
—
array
Contains the registered themes. This list is used by all methods that fetch templates. - $useSpamCheck
—
array
Set to true to provide a spam check field - $use_google_recaptcha
—
boolean
Set to true to use Google Recaptcha as spam check
Methods
protected
public
- CustomHtmlFormInitOutput() — Returns the output of a form that was initialised by a StepPage object.
- getIsConditionalStep() — Is the defined step conditional?
- getIsCurrentStep() — is the defined step the recent step?
- getStepIsVisible() — is the form visible?
- getStepNr() — returns the step number of this form
- getStepTitle() — returns the form step's title
- getVisibleStepNr() — returns the visible step number of this form
- isLastStep() — Returns true if this is the last step.
- isPreviousStepCompleted() — Is the previous step completed?
- isStepCompleted() — is the step completed already
Inherited from CustomHtmlForm\Forms\CustomHtmlForm
protected
- addFieldToGroup() — adds a field to the group
- addRequiredFieldParams() — fill required fields with standard values if they where not specified
- buildFormAction() — Builds and returns the form action to use.
- checkFormData() — checks all form fields and returns them as array
- fillInFieldValues() — this method can be implemented optionally in child classes
- fillInRequestValues() — fills form fields with values from the request
- getDoJsValidation() — is JS validation defined?
- getDoJsValidationScrolling() — Should the form scroll to the first field after validation?
- getFillInRequestValues() — Should the form fields be filled with submitted values from the request object?
- getForm() — creates the form's input fields and action fields and fills missing data with standard values.
- getFormController() — returns the controller object that should be used
- getFormFieldValueLabel() — Returns the parameter used to set the field value; might be "value" or "selectedValue" Liefert den Parameter, der zum Setzen des Feldwertes benutzt wird.
- getShowJsValidationErrorMessages() — Should JS validation messages be shown?
- getSubmitAction() — returns the submit button's title
- getSubmitButtonToolTip() — returns submit button title
- getSubmitButtontitle() — returns submit button title
- submitSuccess() — This method will be call if there are no validation error
public
- CustomHtmlFormErrorMessages() — returns error message as HTML text
- CustomHtmlFormFieldByName() — Returns the HTML code for the passed field; created with the standard template for fields
- CustomHtmlFormFieldGroupExists() — does a group with the passed name exist?
- CustomHtmlFormFieldsByGroup() — returns HTML code for a field group
- CustomHtmlFormMetadata() — passes the meta data for form submission to the template; called by the template
- CustomHtmlFormSpecialFields() — Returns all special fields if configured so as HTML string.
- FormName() — returns the form's name
- HasCustomHtmlFormErrorMessages() — Indicates wether there are error messages.
- HasMessagesForTemplate() — Returns the whether there are messages to loop in template.
- InsertCustomHtmlForm() — Returns HTML markup for the requested form
- RequiredFieldMarker() — Returns an HTML tag for marking fields as required.
- SpamCheckField() — Returns the HTML Code for a spam check field.
- activateValidationFor() — Activate Validation for the given field.
- addErrorMessage() — Defines a new message for a form field
- addMessage() — defines a new message for the form
- buildCacheKey() — Builds the cache key of this form
- createCheckboxFieldDefinition() — Creates and returns a CheckboxField definition.
- createCheckboxSetFieldDefinition() — Creates and returns a CheckboxSetField definition.
- createDropdownFieldDefinition() — Creates and returns a DropdownField definition.
- createFieldDefinition() — Creates and returns a field definition.
- createHiddenFieldDefinition() — Creates and returns a HiddenField definition.
- createMoneyFieldDefinition() — Creates and returns a MoneyField definition.
- createTextFieldDefinition() — Creates and returns a TextField definition.
- createTextareaFieldDefinition() — Creates and returns a TextareaField definition.
- createTreeDropdownFieldDefinition() — Creates and returns a TreeDropdownField definition.
- createTreeMultiselectFieldDefinition() — Creates and returns a TreeMultiselectField definition.
- customDataFieldByName() — Returns the custom data field with the given name.
- deactivateValidationFor() — Deactivate Validation for the given field.
- disableCache() — Disables the CustomHtmlForm file cache
- enableCache() — Enables the CustomHtmlForm file cache
- extendedProcess() — Used to overwrite a CustomHtmlForms process with an extension
- getCache() — Returns the Cache object for CustomHtmlForm
- getCacheKey() — Returns the cache key of this form.
- getCacheKeyExtension() — Returns the cache key extension of this form.
- getCachedFormOutput() — Returns a cached form output
- getCreateShoppingCartForms() — Indicates wether the shoppingcart forms should be drawn.
- getCustomHtmlFormName() — returns the form objects name
- getCustomParameters() — Returns the custom parameters.
- getFormData() — Passes the values from the HTTPRequest object to the defined form; missing values will be set to false
- getFormField() — creates a form field from the definition; sets standard values if they are not defined
- getFormFieldDefinition() — Returns the requested formField or customParameter if available.
- getFormFields() — Returns the forms fields.
- getJavascriptFieldInitialisations() — Returns javascript code for fields that need special initialisation, e.g. the datepicker field
- getJavascriptValidatorInitialisation() — Returns JS commands for JS validators init
- getLoadShoppingCartModules() — Indicates wether the shoppingcart modules should be loaded.
- getMessagesForTemplate() — Returns the messages to loop in template.
- getPreference() — Returns the value for the given preference.
- getRegisteredCustomHtmlForm() — Returns the CustomHtmlForm object with the given identifier; if it's not found a boolean false is returned.
- getRegisteredFormFieldHandlerForType() — Returns a registered handler for the given field type if available.
- getSecurityID() — Return a CSRF-preventing ID to insert into a form.
- getSubmitSuccess() — Returns whether there was an successful submission or not.
- getUseCustomTabIndex() — Returns whether to use a custom tabindex order for the form
- hasCacheKeyExtension() — Returns the cache key extension of this form.
- injectSpecialFormFields() — Injects special form fields before the form gets calculated.
- preferences() — Here you can set the preferences. This is an alternative to setting them via the $preferences class variable.
- registerCustomHtmlForm() — Registers a form object
- registerFormFieldHandler() — Registers a form field handler.
- registerModule() — Add a module for the template pull methods.
- registerTheme() — Add a theme for the template pull methods.
- setCacheKeyExtension() — Sets the cache key extension of this form.
- setCachedFormOutput() — Adds a rendered form output to the cache
- setCustomParameter() — Sets the custom parameter with the given name to the given value.
- setCustomParameters() — Sets the custom parameters.
- setFormField() — Set a form field.
- setFormFieldValue() — Set a custom parameter on the given form field.
- setSecurityTokenDisabled() — Disable the security token.
- setSubmitSuccess() — Sets whether there was an successful submission or not.
- setUseCustomTabIndex() — Sets whether to use a custom tabindex order for the form
- submit() — Processes the submitted form; If there are validation errors the form will be returned with error messages.
- submitFailure() — In calse of validation errors the form will be returned with error messages
- useCustomTabIndex() — Returns whether to use a custom tabindex order for the form
- useSpamCheckFor() — Set spam check for a form