UserDefinedFormController
class UserDefinedFormController extends PageController (View source)
Controller for the UserDefinedForm page type.
Properties
Methods
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.
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.
Get the form for the page. Form can be modified by calling updateForm() on a UserDefinedForm extension.
Generate the javascript for the conditional field show / hiding logic.
Returns the maximum size uploaded files can be before they're excluded from CMS configured recipient emails
Convert file sizes with a single character for unit size to true byte count.
This action handles rendering the "finished" message, which is customizable by editing the ReceivedFormSubmission template.
Details
        
                    protected        
    init()
        
    
    No description
        
                    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.
        
                            array
    index(HTTPRequest $request = null)
        
    
    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.
        
                            int
    ping()
        
    
    Keep the session alive for the user.
        
                            Form
    Form()
        
    
    Get the form for the page. Form can be modified by calling updateForm() on a UserDefinedForm extension.
        
                            void
    generateConditionalJavascript()
        
    
    Generate the javascript for the conditional field show / hiding logic.
        
                            int
    getMaximumAllowedEmailAttachmentSize()
        
    
    Returns the maximum size uploaded files can be before they're excluded from CMS configured recipient emails
        
                    protected        int
    parseByteSizeString(string $byteSize)
        
    
    Convert file sizes with a single character for unit size to true byte count.
Just as with php.ini and e.g. 128M -> 1024 1024 128 bytes.
        
                            HTTPResponse
    process(array $data, Form $form)
        
    
    Process the form that is submitted through the site
{\SilverStripe\UserForms\Form\UserForm::validate()} for validation step prior to processing
        
                    protected        ArrayData
    getMergeFieldsMap(ArrayList $fields = [])
        
    
    Allows the use of field values in email body.
        
                            ViewableData
    finished()
        
    
    This action handles rendering the "finished" message, which is customizable by editing the ReceivedFormSubmission template.
        
                    protected        string
    buildWatchJS(array $watch)
        
    
    Outputs the required JS from the $watch input