Properties

$set_mode

$set_mode : string

Type

string

Methods

__construct()

__construct() 

Fields constructor.

checkbox()

checkbox(integer  $id, string  $title) 

Standard checkbox field

Parameters

integer $id
string $title

show_social_urls()

show_social_urls() 

Shows social links

add_hidden_field()

add_hidden_field(string  $field) 

Hidden field inside a shortcode

Parameters

string $field

disabled_hidden_field()

disabled_hidden_field(string  $key, string  $value) : string

Get hidden field

Parameters

string $key
string $value

Returns

string

globally_update_field()

globally_update_field(integer  $id, array  $args) 

Updates a field globally

Parameters

integer $id
array $args

update_field()

update_field(integer  $id, array  $args, integer  $form_id) 

Updates a field in form only

Parameters

integer $id
array $args
integer $form_id

delete_field_from_form()

delete_field_from_form(integer  $id, integer  $form_id) 

Deletes a field in form only

Parameters

integer $id
integer $form_id

delete_field_from_db()

delete_field_from_db(integer  $id) 

Deletes a field from custom fields

Parameters

integer $id

add_field_from_list()

add_field_from_list(integer  $global_id, integer  $form_id, array  $position = array()) 

Quickly adds a field from custom fields

Parameters

integer $global_id
integer $form_id
array $position

add_field_from_predefined()

add_field_from_predefined(integer  $global_id, integer  $form_id, array  $position = array()) 

Quickly adds a field from pre-defined fields

Parameters

integer $global_id
integer $form_id
array $position

duplicate_field()

duplicate_field(integer  $id, integer  $form_id) 

Duplicates a frield by meta key

Parameters

integer $id
integer $form_id

field_error()

field_error(string  $text, boolean  $force_show = false) : string

Print field error

Parameters

string $text
boolean $force_show

Returns

string

is_error()

is_error(string  $key) : boolean

Checks if field has a server-side error

Parameters

string $key

Returns

boolean

show_error()

show_error(string  $key) : string

Returns field error

Parameters

string $key

Returns

string

field_label()

field_label(string  $label, string  $key, array  $data) : string

Display field label

Parameters

string $label
string $key
array $data

Returns

string

get_class()

get_class(string  $key, array  $data, string  $add = null) : string

Output field classes

Parameters

string $key
array $data
string $add

Returns

string

field_value()

field_value(string  $key, boolean  $default = false, array  $data = null) : mixed

Gets field value

Parameters

string $key
boolean $default
array $data

Returns

mixed

is_selected()

is_selected(string  $key, string  $value, array  $data) : boolean

Checks if an option is selected

Parameters

string $key
string $value
array $data

Returns

boolean

is_radio_checked()

is_radio_checked(string  $key, string  $value, array  $data) : boolean

Checks if a radio button is selected

Parameters

string $key
string $value
array $data

Returns

boolean

get_field_icon()

get_field_icon(string  $key) : string

Get field icon

Parameters

string $key

Returns

string

get_option_value_from_callback()

get_option_value_from_callback(string  $value, array  $data, string  $type) : \um\core\json

Gets selected option value from a callback function

Parameters

string $value
array $data
string $type

Returns

\um\core\json

get_options_from_callback()

get_options_from_callback(array  $data, string  $type) : array

Get select options from a callback function

Parameters

array $data
string $type

Returns

array —

$arr_options

get_field_type()

get_field_type(string  $key) : string

Get field type

Parameters

string $key

Returns

string

get_label()

get_label(string  $key) : string

Get field label

Parameters

string $key

Returns

string

get_field_title()

get_field_title(string  $key) : string

Get field title

Parameters

string $key

Returns

string

get_fields()

get_fields() : array

Get form fields

Returns

array

get_field()

get_field(string  $key) : array

Get specific field

Parameters

string $key

Returns

array

filter_field_non_utf8_value()

filter_field_non_utf8_value(  $option_value) : mixed|void

Parameters

$option_value

Returns

mixed|void

edit_field()

edit_field(string  $key, array  $data, boolean  $rule = false) : string

Gets a field in 'input mode'

Parameters

string $key
array $data
boolean $rule

Returns

string

get_available_roles()

get_available_roles(  $form_key, array  $options = array()) : array

Filter for user roles

Parameters

$form_key
array $options

Returns

array

array_sort_by_column()

array_sort_by_column(array  $arr, string  $col, string  $dir = SORT_ASC) : array

Sorts columns array

Parameters

array $arr
string $col
string $dir

Returns

array —

$arr

get_fields_by_row()

get_fields_by_row(integer  $row_id) : string

Get fields in row

Parameters

integer $row_id

Returns

string

get_fields_in_subrow()

get_fields_in_subrow(string  $row_fields, integer  $subrow_id) : mixed

Get fields by sub row

Parameters

string $row_fields
integer $subrow_id

Returns

mixed

get_fields_in_group()

get_fields_in_group(integer  $group_id) : mixed

Get fields in group

Parameters

integer $group_id

Returns

mixed

get_fields_in_column()

get_fields_in_column(array  $fields, integer  $col_number) : mixed

Get fields in column

Parameters

array $fields
integer $col_number

Returns

mixed

display()

display(string  $mode, array  $args) : string

Display fields

Parameters

string $mode
array $args

Returns

string

view_field()

view_field(string  $key, array  $data, boolean  $rule = false) : string

Gets a field in `view mode`

Parameters

string $key
array $data
boolean $rule

Returns

string

view_field_output()

view_field_output(array  $data) : array

Filter field data

Parameters

array $data

Returns

array

display_view()

display_view(string  $mode, array  $args) : string

Display fields ( view mode )

Parameters

string $mode
array $args

Returns

string

new_row_output()

new_row_output(string  $row_id, array  $row_array) : array

Get new row in form

Parameters

string $row_id
array $row_array

Returns

array

do_ajax_action()

do_ajax_action()