SilverStripe\UserForms\Control\UserDefinedFormController
Controller for the {@link UserDefinedForm} page type.
Synopsis
class UserDefinedFormController
extends PageController
{
- // members
- private static string $finished_anchor = '#uff';
- private static array $allowed_actions = ;
- private static string $form_submissions_folder = 'Form-submissions';
- // methods
- protected void init()
- protected void addUserFormsValidatei18n()
- public array index()
- public int ping()
- public Form Form()
- public void generateConditionalJavascript()
- public HTTPResponse process()
- protected ArrayData getMergeFieldsMap()
- public ViewableData finished()
- protected string buildWatchJS()
Hierarchy
Extends
- PageController
Members
private
- $allowed_actions
- $finished_anchor
- $form_submissions_folder — string
Methods
protected
- addUserFormsValidatei18n() — Add the necessary jQuery validate i18n translation files, either by locale or by langauge, e.g. 'en_NZ' or 'en'. This adds "methods_abc.min.js" as well as "messages_abc.min.js" from the jQuery validate thirdparty library from dist/js.
- buildWatchJS() — Outputs the required JS from the $watch input
- getMergeFieldsMap() — Allows the use of field values in email body.
- init()
public
- Form() — Get the form for the page. Form can be modified by calling {@link updateForm()} on a UserDefinedForm extension.
- finished() — This action handles rendering the "finished" message, which is customizable by editing the ReceivedFormSubmission template.
- generateConditionalJavascript() — Generate the javascript for the conditional field show / hiding logic.
- index() — Using $UserDefinedForm in the Content area of the page shows where the form should be rendered into. If it does not exist then default back to $Form.
- ping() — Keep the session alive for the user.
- process() — Process the form that is submitted through the site