Overview

Classes

  • Quform
  • Quform_Admin_InsertForm
  • Quform_Admin_Page
  • Quform_Admin_Page_Controller
  • Quform_Admin_Page_Dashboard
  • Quform_Admin_Page_Entries
  • Quform_Admin_Page_Entries_Edit
  • Quform_Admin_Page_Entries_List
  • Quform_Admin_Page_Entries_View
  • Quform_Admin_Page_Factory
  • Quform_Admin_Page_Forms_Add
  • Quform_Admin_Page_Forms_Edit
  • Quform_Admin_Page_Forms_List
  • Quform_Admin_Page_Help
  • Quform_Admin_Page_Preview
  • Quform_Admin_Page_Settings
  • Quform_Admin_Page_Tools
  • Quform_Admin_Page_Tools_ExportEntries
  • Quform_Admin_Page_Tools_ExportForm
  • Quform_Admin_Page_Tools_Home
  • Quform_Admin_Page_Tools_ImportForm
  • Quform_Admin_Page_Tools_Migrate
  • Quform_Admin_Page_Tools_Uninstall
  • Quform_Api
  • Quform_Block
  • Quform_Builder
  • Quform_Captcha
  • Quform_ClassLoader
  • Quform_Confirmation
  • Quform_Container
  • Quform_Dashboard_Widget
  • Quform_Dispatcher
  • Quform_Element
  • Quform_Element_Captcha
  • Quform_Element_Checkbox
  • Quform_Element_Column
  • Quform_Element_Container
  • Quform_Element_Container_Iterator
  • Quform_Element_Date
  • Quform_Element_Email
  • Quform_Element_Factory
  • Quform_Element_Field
  • Quform_Element_File
  • Quform_Element_Group
  • Quform_Element_Hidden
  • Quform_Element_Honeypot
  • Quform_Element_Html
  • Quform_Element_Multi
  • Quform_Element_Multiselect
  • Quform_Element_Name
  • Quform_Element_Page
  • Quform_Element_Password
  • Quform_Element_Radio
  • Quform_Element_Recaptcha
  • Quform_Element_Row
  • Quform_Element_Select
  • Quform_Element_Submit
  • Quform_Element_Text
  • Quform_Element_Textarea
  • Quform_Element_Time
  • Quform_Entry_Controller
  • Quform_Entry_Exporter
  • Quform_Entry_List_Settings
  • Quform_Entry_List_Table
  • Quform_Entry_Processor
  • Quform_Entry_UserSearcher
  • Quform_Filter_Abstract
  • Quform_Filter_Alpha
  • Quform_Filter_AlphaNumeric
  • Quform_Filter_Digits
  • Quform_Filter_Regex
  • Quform_Filter_Static
  • Quform_Filter_StripTags
  • Quform_Filter_Trim
  • Quform_Form
  • Quform_Form_Controller
  • Quform_Form_Exporter
  • Quform_Form_Factory
  • Quform_Form_Importer
  • Quform_Form_Iterator
  • Quform_Form_List_Settings
  • Quform_Form_List_Table
  • Quform_Form_Processor
  • Quform_License
  • Quform_Migrator
  • Quform_NonceRefresher
  • Quform_Notification
  • Quform_Notification_Resender
  • Quform_Options
  • Quform_Permissions
  • Quform_Repository
  • Quform_ScriptLoader
  • Quform_Session
  • Quform_Settings
  • Quform_Shortcode
  • Quform_Themes
  • Quform_TokenReplacer
  • Quform_Toolbar
  • Quform_Translations
  • Quform_Updater
  • Quform_Upgrader
  • Quform_Uploader
  • Quform_Validator_Abstract
  • Quform_Validator_Alpha
  • Quform_Validator_AlphaNumeric
  • Quform_Validator_Array
  • Quform_Validator_Captcha
  • Quform_Validator_Date
  • Quform_Validator_Digits
  • Quform_Validator_Duplicate
  • Quform_Validator_Email
  • Quform_Validator_FileUpload
  • Quform_Validator_GreaterThan
  • Quform_Validator_Honeypot
  • Quform_Validator_Identical
  • Quform_Validator_InArray
  • Quform_Validator_Length
  • Quform_Validator_LessThan
  • Quform_Validator_Recaptcha
  • Quform_Validator_Regex
  • Quform_Validator_Required
  • Quform_Validator_Static
  • Quform_Validator_Time
  • Quform_View
  • Quform_ViewFactory
  • Quform_Widget_Form
  • Quform_Widget_Popup

Interfaces

  • Quform_Attachable
  • Quform_Element_Editable
  • Quform_Filter_Interface
  • Quform_Validator_Interface
  • Overview
  • Class

Class Quform_Builder

Copyright: Copyright (c) 2009-2022 ThemeCatcher (https://www.themecatcher.net)
Located at Quform/Builder.php
Methods summary
public
# __construct( Quform_Repository $repository, Quform_Form_Factory $factory, Quform_Options $options, Quform_Themes $themes, Quform_ScriptLoader $scriptLoader )

Parameters

$repository
$factory
$options
$themes
$scriptLoader
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

$form

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
# getBulkOptions( )
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

$type
The element type

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
# getStyleHtml( )

Get the HTML for a style

Get the HTML for a style

Returns

string
public string
# getGlobalStyleHtml( array $style = array() )

Get the HTML for a global style

Get the HTML for a global style

Parameters

$style

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
# getFilters( )

Get the list of filters

Get the list of filters

Returns

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

$notification

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

$confirmation

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

$confirmation

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
# getFormConfigValue( array $form, string $key )

Parameters

$form
$key

Returns

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

$element
The page config

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

$element
The row config

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

$type
The element type

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

$key
$elementId
$label

Returns

string
public array
# getVariables( )

Returns

array
public array
# getPreProcessVariables( )

Returns

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

$config

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

$datetime
$format

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

$datetime
$format

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

$config

Returns

array
protected array
# sanitizeGlobalStyles( array $styles )

Sanitize the settings for the given global styles

Sanitize the settings for the given global styles

Parameters

$styles

Returns

array
protected array
# sanitizeNotifications( array $notifications )

Sanitize the given array of notifications

Sanitize the given array of notifications

Parameters

$notifications

Returns

array
protected array
# sanitizeNotificationRecipients( array $recipients )

Sanitize the given array of notification recipients

Sanitize the given array of notification recipients

Parameters

$recipients

Returns

array
protected array
# sanitizeNotificationConditionals( array $conditionals )

Sanitize the given array of notification conditionals

Sanitize the given array of notification conditionals

Parameters

$conditionals

Returns

array
protected array
# sanitizeNotificationFrom( array $from )

Sanitize the given notification "From" address array

Sanitize the given notification "From" address array

Parameters

$from

Returns

array
protected array
# sanitizeNotificationAttachments( array $attachments )

Sanitize the given array of notification attachments

Sanitize the given array of notification attachments

Parameters

$attachments

Returns

array
protected array
# sanitizeNotificationAttachmentMedia( array $media )

Sanitize the given array of notification attachment media

Sanitize the given array of notification attachment media

Parameters

$media

Returns

array
protected array
# sanitizeConfirmations( array $confirmations )

Sanitize the given array of confirmations

Sanitize the given array of confirmations

Parameters

$confirmations

Returns

array
protected array
# sanitizeDatabaseColumns( array $columns )

Sanitize the settings for the given database columns

Sanitize the settings for the given database columns

Parameters

$columns

Returns

array
protected array
# sanitizeContainer( array $container )

Sanitize the given container config and return it

Sanitize the given container config and return it

Parameters

$container

Returns

array
protected array
# sanitizeElement( array $element )

Sanitize the given element config and return it

Sanitize the given element config and return it

Parameters

$element

Returns

array
protected string
# sanitizeHtml( string $value )

Sanitize the HTML in the given string

Sanitize the HTML in the given string

Parameters

$value

Returns

string
protected array
# sanitizeStyles( array $styles, string $elementType )

Sanitize the settings for the given styles

Sanitize the settings for the given styles

Parameters

$styles
$elementType

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

$color

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
# validatePreviewRequest( )

Validate the request to preview the form

Validate the request to preview the form

protected
# validateForm( array $config )

Parameters

$config
public array
# getThemes( )

Returns

array
public
# getLocales( )

return array

return array

protected array
# getLoadedPreviewLocales( )

Returns

array
protected string
# getAttachmentHtml( )

Returns

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

$variables

Returns

string
public
# searchPosts( )

Handle the request to search posts via Ajax

Handle the request to search posts via Ajax

protected
# validateSearchPostsRequest( )

Validate the request to search posts via Ajax

Validate the request to search posts via Ajax

public
# getPostTitle( )

Handle the request to get a post title via Ajax

Handle the request to get a post title via Ajax

protected
# validateGetPostTitleRequest( )

Validate the request to get a post title via Ajax

Validate the request to get a post title via Ajax

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
Properties summary
protected Quform_Repository $repository
#
protected Quform_Form_Factory $factory
#
protected Quform_Options $options
#
protected Quform_Themes $themes
#
protected Quform_ScriptLoader $scriptLoader
#
API documentation generated by ApiGen