Methods summary
public
|
|
public
array
|
#
getScriptL10n( )
Get the localisation / variables to pass to the builder JS
Get the localisation / variables to pass to the builder JS
Returns
array
|
public
array
|
#
prepare( array $form )
Prepare a form for editing
Prepare a form for editing
Parameters
Returns
array
|
protected
string
|
#
getOptionHtml( string $type )
Get the HTML for an option for a select element
Get the HTML for an option for a select element
Parameters
- $type
- The element type, 'select', 'radio', 'checkbox' or 'multiselect'
Returns
string
|
protected
string
|
#
getOptgroupHtml( )
Get the HTML for an optgroup for a select element
Get the HTML for an optgroup for a select element
Returns
string
|
protected
array
|
#
getDefaultOptions( )
Get the default option config for each element type
Get the default option config for each element type
Returns
array
|
protected
array
|
#
getDefaultOptgroups( )
Get the default optgroup config for each element type
Get the default optgroup config for each element type
Returns
array
|
public
|
|
protected
array
|
#
getCountries( )
Returns an array of all countries
Returns an array of all countries
Returns
array
|
protected
array
|
#
getUsStates( )
Returns an array of US states
Returns an array of US states
Returns
array
|
protected
array
|
#
getCanadianProvinces( )
Returns an array of Canadian Provinces / Territories
Returns an array of Canadian Provinces / Territories
Returns
array
|
protected
array
|
#
getUkCounties( )
Returns an array of UK counties
Returns an array of UK counties
Returns
array
|
protected
array
|
#
getAllMonths( )
Get all the months in the year
Get all the months in the year
Returns
array
|
public
array
|
#
getElements( string|null $type = null )
Get the core form elements config
Get the core form elements config
Parameters
- $type
- The element type or null for all elements
Returns
array
|
protected
array
|
#
getDefaultElementConfig( string $type )
Get the default config for the element of the given type
Get the default config for the element of the given type
Parameters
Returns
array The default element config
|
public
array
|
#
getStyles( )
Get the element styles data
Get the element styles data
Returns
array
|
public
array
|
#
getGlobalStyles( string $key = null )
Get all available global styles
Get all available global styles
Parameters
- $key
- Only get the style with this key
Returns
array
|
protected
string
|
|
public
string
|
#
getGlobalStyleHtml( array $style = array() )
Get the HTML for a global style
Get the HTML for a global style
Parameters
Returns
string
|
protected
array
|
#
getVisibleStyles( )
Gets the list of styles that are visible for each element
Gets the list of styles that are visible for each element
Returns
array
|
public
array
|
|
protected
string
|
#
getFilterHtml( )
Get the HTML for a filter
Get the HTML for a filter
Returns
string
|
protected
array
|
#
getVisibleFilters( )
Get the list of visible filters for the elements
Get the list of visible filters for the elements
Returns
array
|
public
array
|
#
getValidators( )
Get the validator configurations
Get the validator configurations
Returns
array
|
protected
string
|
#
getValidatorHtml( )
Get the HTML for a validator
Get the HTML for a validator
Returns
string
|
protected
array
|
#
getVisibleValidators( )
Get the list of visible validators for the elements
Get the list of visible validators for the elements
Returns
array
|
public
string
|
#
getNotificationHtml( array $notification = null )
Get the HTML for a notification
Get the HTML for a notification
Parameters
Returns
string
|
public
string
|
#
getRecipientHtml( )
Get the HTML for an email recipient
Get the HTML for an email recipient
Returns
string
|
public
string
|
#
getInsertVariableHtml( string $targetId = '', boolean $preProcess = false )
Get the HTML for the insert variable button
Get the HTML for the insert variable button
Parameters
- $targetId
- The unique ID of the target field
- $preProcess
- Whether it is the pre process variables
Returns
string
|
public
string
|
#
getConfirmationHtml( array $confirmation = null )
Get the HTML for a confirmation
Get the HTML for a confirmation
Parameters
Returns
string
|
protected
string
|
#
getConfirmationDescription( array $confirmation )
Get the confirmation description
Get the confirmation description
Changes should be mirrored in builder.confirmations.js:getConfirmationDescription
Parameters
Returns
string
|
public
string
|
#
getTitleTagSelectHtml( string $id, string $selected = '' )
Get the HTML for a select menu of available title tag options
Get the HTML for a select menu of available title tag options
Parameters
- $id
- The ID of the field
- $selected
- The selected value
Returns
string
|
public
array
|
#
getAutocompleteValues( )
The supported autocomplete attributes from https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill
The supported autocomplete attributes from https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill
Returns
array
|
public
string
|
#
getDbColumnHtml( array|null $column = null )
Get the HTML for the custom database column settings
Get the HTML for the custom database column settings
Parameters
- $column
- The existing column config
Returns
string
|
public
array
|
#
getDefaultForm( )
Get the default form configuration array with populated default settings
Get the default form configuration array with populated default settings
Returns
array
|
public
mixed
|
|
public
string
|
#
renderFormElements( array $elements )
Get the HTML for all pages and elements for the form builder
Get the HTML for all pages and elements for the form builder
Parameters
- $elements
- The array of element configs
Returns
string
|
protected
string
|
#
getElementHtml( array $element )
Get the HTML for an element in the form builder
Get the HTML for an element in the form builder
Parameters
- $element
- The element config
Returns
string
|
protected
string
|
#
getPageHtml( array $element )
Get the HTML for a page for the form builder
Get the HTML for a page for the form builder
Parameters
Returns
string
|
protected
string
|
#
getGroupHtml( array $element )
Get the HTML for a group for the form builder
Get the HTML for a group for the form builder
Parameters
- $element
- The group config
Returns
string The HTML
|
protected
string
|
#
getRowHtml( array $element )
Get the HTML for a row for the form builder
Get the HTML for a row for the form builder
Parameters
Returns
string
|
protected
string
|
#
getColumnHtml( array $element )
Get the HTML for a column for the form builder
Get the HTML for a column for the form builder
Parameters
- $element
- The column config
Returns
string
|
protected
string
|
#
getFieldHtml( array $element )
Get the HTML for a field for the form builder
Get the HTML for a field for the form builder
Parameters
- $element
- The element config
Returns
string The HTML
|
protected
string
|
#
getDefaultElementHtml( string $type )
Get the HTML for a default element with the given type
Get the HTML for a default element with the given type
Parameters
Returns
string
|
public
string
|
#
getPageTabNavHtml( integer $key = null, array $elementId = null, string $label = null )
Get the HTML for a single page tab nav
Get the HTML for a single page tab nav
Parameters
Returns
string
|
public
array
|
|
public
array
|
|
public
array
|
#
getRecaptchaLanguages( )
The supported reCAPTCHA languages from https://developers.google.com/recaptcha/docs/language
The supported reCAPTCHA languages from https://developers.google.com/recaptcha/docs/language
Returns
array
|
public
array
|
#
getHcaptchaLanguages( )
The supported hCaptcha languages from https://docs.hcaptcha.com/languages/
The supported hCaptcha languages from https://docs.hcaptcha.com/languages/
Returns
array
|
public
array
|
#
getTurnstileLanguages( )
The supported Turnstile languages from https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#configurations
The supported Turnstile languages from https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#configurations
Returns
array
|
protected
string
|
#
getLogicRuleHtml( )
Get the HTML for a blank logic rule
Get the HTML for a blank logic rule
Returns
string
|
protected
array
|
#
getLogicSourceTypes( )
Get the element types that can be used as a source for conditional logic
Get the element types that can be used as a source for conditional logic
Returns
array
|
protected
array
|
#
getAttachmentSourceTypes( )
Get the element types than can be used as a source for attachments
Get the element types than can be used as a source for attachments
Returns
array
|
public
|
#
save( )
Handle the request to save the form via Ajax
Handle the request to save the form via Ajax
|
protected
|
#
validateSaveRequest( )
Validate the request to save the form
Validate the request to save the form
|
public
array
|
#
sanitizeForm( array $config )
Sanitize the given form config and return it
Sanitize the given form config and return it
Parameters
Returns
array
|
protected
string
|
#
sanitizeDateTime( string $datetime, $format = 'Y-m-d H:i:s' )
Sanitize the given datetime value and converts it to UTC
Sanitize the given datetime value and converts it to UTC
Parameters
Returns
string
|
protected
string
|
#
convertDateTimeToWpTimezone( string $datetime, $format = 'Y-m-d H:i:s' )
Converts a datetime string to the WP timezone
Converts a datetime string to the WP timezone
Parameters
Returns
string
|
public
array
|
#
sanitiseForm( array $config )
Sanitize the given form config and return it
Sanitize the given form config and return it
Deprecated
2.4.0
Parameters
Returns
array
|
protected
array
|
#
sanitizeGlobalStyles( array $styles )
Sanitize the settings for the given global styles
Sanitize the settings for the given global styles
Parameters
Returns
array
|
protected
array
|
#
sanitizeNotifications( array $notifications )
Sanitize the given array of notifications
Sanitize the given array of notifications
Parameters
Returns
array
|
protected
array
|
#
sanitizeNotificationRecipients( array $recipients )
Sanitize the given array of notification recipients
Sanitize the given array of notification recipients
Parameters
Returns
array
|
protected
array
|
#
sanitizeNotificationConditionals( array $conditionals )
Sanitize the given array of notification conditionals
Sanitize the given array of notification conditionals
Parameters
Returns
array
|
protected
array
|
#
sanitizeNotificationFrom( array $from )
Sanitize the given notification "From" address array
Sanitize the given notification "From" address array
Parameters
Returns
array
|
protected
array
|
#
sanitizeNotificationAttachments( array $attachments )
Sanitize the given array of notification attachments
Sanitize the given array of notification attachments
Parameters
Returns
array
|
protected
array
|
#
sanitizeNotificationAttachmentMedia( array $media )
Sanitize the given array of notification attachment media
Sanitize the given array of notification attachment media
Parameters
Returns
array
|
protected
array
|
#
sanitizeConfirmations( array $confirmations )
Sanitize the given array of confirmations
Sanitize the given array of confirmations
Parameters
Returns
array
|
protected
array
|
#
sanitizeDatabaseColumns( array $columns )
Sanitize the settings for the given database columns
Sanitize the settings for the given database columns
Parameters
Returns
array
|
protected
array
|
#
sanitizeContainer( array $container )
Sanitize the given container config and return it
Sanitize the given container config and return it
Parameters
Returns
array
|
protected
array
|
#
sanitizeElement( array $element )
Sanitize the given element config and return it
Sanitize the given element config and return it
Parameters
Returns
array
|
protected
string
|
#
sanitizeHtml( string $value )
Sanitize the HTML in the given string
Sanitize the HTML in the given string
Parameters
Returns
string
|
protected
array
|
#
sanitizeStyles( array $styles, string $elementType )
Sanitize the settings for the given styles
Sanitize the settings for the given styles
Parameters
Returns
array
|
protected
array
|
#
sanitizeLogicRules( array $rules )
Sanitize the settings for the given logic rules
Sanitize the settings for the given logic rules
Parameters
- $rules
- The logic rules to sanitize
Returns
array The sanitized logic rules
|
protected
array
|
#
sanitizeFilters( array $filters, string $elementType )
Sanitize the settings for the given filters
Sanitize the settings for the given filters
Parameters
- $filters
- The filters to sanitize
- $elementType
- The element type
Returns
array The sanitized filters
|
protected
array
|
#
sanitizeValidators( array $validators, string $elementType )
Sanitize the settings for the given validators
Sanitize the settings for the given validators
Parameters
- $validators
- The validators to sanitize
- $elementType
- The element type
Returns
array The sanitized validators
|
protected
array
|
#
sanitizeSelectOptions( array $options )
Sanitize the given select/multiselect options
Sanitize the given select/multiselect options
Parameters
- $options
- The options to sanitize
Returns
array The sanitized options
|
protected
array
|
#
sanitizeSelectOption( array $option )
Sanitize the given select/multiselect option
Sanitize the given select/multiselect option
Parameters
- $option
- The option to sanitize
Returns
array The sanitized option
|
protected
array
|
#
sanitizeCheckboxRadioOptions( array $options )
Sanitize the given checkbox/radio element options
Sanitize the given checkbox/radio element options
Parameters
- $options
- The options to sanitize
Returns
array The sanitized options
|
protected
array
|
#
sanitizeRgbColorArray( array $color )
Sanitize the given RGB color array
Sanitize the given RGB color array
Parameters
Returns
array
|
public
|
#
add( )
Handle the Ajax request to add a new form
Handle the Ajax request to add a new form
|
protected
|
#
validateAddRequest( )
Validate the request to add a new form
Validate the request to add a new form
|
public
|
#
preview( )
Handle the request to preview the form via Ajax
Handle the request to preview the form via Ajax
|
protected
|
|
protected
|
|
public
array
|
|
public
|
|
protected
array
|
|
protected
string
|
|
public
string
|
#
getDbPasswordHtml( )
Get the HTML for the database password field
Get the HTML for the database password field
Returns
string
|
protected
string
|
#
getSelectHtml( string $id, array $options, string $selectedValue = '' )
Get the HTML for a select menu
Get the HTML for a select menu
Parameters
- $id
- The ID of the field
- $options
- The select options
- $selectedValue
- The selected value
Returns
string
|
public
string
|
#
getResponsiveSelectHtml( string $id, string $selectedValue = '', boolean $showInheritOption = true )
Get the HTML for the responsive setting select menu
Get the HTML for the responsive setting select menu
Parameters
- $id
- The ID of the field
- $selectedValue
- The selected value
- $showInheritOption
- Shows the "Inherit" option if true
Returns
string
|
public
string
|
#
getSizeSelectHtml( string $id, string $selectedValue = '', boolean $showInheritOption = true )
Get the HTML for the element size setting select menu
Get the HTML for the element size setting select menu
Parameters
- $id
- The ID of the field
- $selectedValue
- The selected value
- $showInheritOption
- Shows the "Inherit" option if true
Returns
string
|
public
string
|
#
getFieldWidthSelectHtml( string $id, string $selectedValue = '', boolean $showInheritOption = true )
Get the HTML for the field width setting select menu
Get the HTML for the field width setting select menu
Parameters
- $id
- The ID of the field
- $selectedValue
- The selected value
- $showInheritOption
- Shows the "Inherit" option if true
Returns
string
|
public
string
|
#
getButtonStyleSelectHtml( string $id, string $selectedValue = '', boolean $showInheritOption = true, string|null $emptyOptionText = null )
Get the HTML for the button style setting select menu
Get the HTML for the button style setting select menu
Parameters
- $id
- The ID of the field
- $selectedValue
- The selected value
- $showInheritOption
- Shows the "Inherit" option if true
- $emptyOptionText
- The text for the empty option
Returns
string
|
public
string
|
#
getButtonWidthSelectHtml( string $id, string $selectedValue = '', boolean $showInheritOption = true )
Get the HTML for the button width setting select menu
Get the HTML for the button width setting select menu
Parameters
- $id
- The ID of the field
- $selectedValue
- The selected value
- $showInheritOption
- Shows the "Inherit" option if true
Returns
string
|
public
string
|
#
getOptionsStyleSelectHtml( string $id, string $selectedValue = '', boolean $showInheritOption = true )
Get the HTML for the options style setting select menu
Get the HTML for the options style setting select menu
Parameters
- $id
- The ID of the field
- $selectedValue
- The selected value
- $showInheritOption
- Shows the "Inherit" option if true
Returns
string
|
public
string
|
#
getSelectIconHtml( string $id, string $selected = '' )
Get the HTML for the select icon field
Get the HTML for the select icon field
Parameters
- $id
- The ID of the field
- $selected
- The selected icon
Returns
string
|
protected
boolean
|
#
isCoreIcon( string $icon )
Is the given icon class one of the core plugin icons?
Is the given icon class one of the core plugin icons?
Parameters
- $icon
- The icon classes e.g. 'fa fa-check'
Returns
boolean
|
public
string
|
#
getIconPositionSelectHtml( string $id, string $selectedValue = '', boolean $showInheritOption = true )
Get the HTML for the icon position select
Get the HTML for the icon position select
Parameters
- $id
- The ID of the field
- $selectedValue
- The selected value
- $showInheritOption
- Shows the "Inherit" option if true
Returns
string
|
public
string
|
#
getCssHelperHtml( )
Get the HTML for the CSS helper widget
Get the HTML for the CSS helper widget
Returns
string
|
public
string
|
#
formatVariables( array $variables )
Format the given variables array to display in a <pre> tag
Format the given variables array to display in a <pre> tag
Parameters
Returns
string
|
public
|
#
searchPosts( )
Handle the request to search posts via Ajax
Handle the request to search posts via Ajax
|
protected
|
|
public
|
#
getPostTitle( )
Handle the request to get a post title via Ajax
Handle the request to get a post title via Ajax
|
protected
|
|
public
array
|
#
getQuformIcons( )
Get the array of available Quform icons
Get the array of available Quform icons
Returns
array
|
public
array
|
#
getFontAwesomeIcons( )
Get the array of available FontAwesome icons
Get the array of available FontAwesome icons
Updated for v4.7.0
Returns
array
|