Form Utils
utils
Here is the list of available variables you can use while writing Javascript.
Access Controller | Variable | Description |
---|---|---|
public | ChoicesWrapper | ChoicesWrapper |
public | I18n | This file is used to mimic the i18n library interface. |
public | checkInvalidDate(value: String, format: String, maxDate: Date, minDate: Date): * | Checks the entered date for validity. |
public | lessOrGreater(value: moment, format: String, maxDate: Date, minDate: Date): {"message": *, "result": *} | Checks the value for a min date and max date. |
public | applyFormChanges(form: *, changes: *): {"form": *, "failed": *} | Checks the value for a min date and max date. |
public | eachComponent(components: Object, fn: Function, includeAll: Boolean, path: String, parent: Object) | Iterate through each component within a form. |
public | escapeRegExCharacters(value: String): string | Escapes RegEx characters in provided String value. |
public | findComponent(components: *, key: *, fn: *, path: *): * | This function will find a component in a form and return the component AND THE PATH to the component in the form. |
public | findComponents(components: *, query: *): * | Deprecated version of findComponents. |
public | flattenComponents(components: Object, includeAll: Boolean): Object | Flatten the form components for data manipulation. |
public | formatAsCurrency(value: any): String | Formats provided value in how the Currency component uses it. |
public | generateFormChange(type: *, data: *): * | |
public | getComponent(components: Object, key: String | Object): Object |
public | getStrings(form: *): * | Iterate over all components in a form and get string values for translation. |
public | getValue(submission: Object, key: String): * | Get the value for a component key in the given submission. |
public | hasCondition(component: *): boolean | Returns if this component has a conditional statement. |
public | isLayoutComponent(component: Object): Boolean | Determine if a component is a layout component. |
public | matchComponent(component: *, query: *): boolean | Matches if a component matches the query |
public | parseFloatExt(value: any): Number | Extension of standard #parseFloat(value) function, that also clears input string. |
public | removeComponent(components: *, path: *) | Remove a component by path. |
public | searchComponents(components: *, query: *): * | Finds a component provided a query of properties of that component. |
public | KEY_CODES: {"BACK_KEY": number, "DELETE_KEY": number, "TAB_KEY": number, "ENTER_KEY": number, "A_KEY": number, "ESC_KEY": number, "UP_KEY": number, "DOWN_KEY": number, "PAGE_UP_KEY": number, "PAGE_DOWN_KEY": number} | |
public | Evaluator: {"noeval": *, "protectedEval": *, "cache": *, "templateSettings": *, "evaluator": *, "template": function, "interpolate": function, "evaluate": function} | |
public | CALENDAR_ERROR_MESSAGES: {"INVALID": string, "INCOMPLETE": string, "greater": function, "less": function} | |