\um\coreForm

Class Form

Summary

Methods
Properties
Constants
__construct()
ajax_muted_action()
ajax_select_options()
count_errors()
add_error()
has_error()
field_declare()
form_init()
beautify()
display_form_type()
assigned_role()
form_type()
custom_field_roles()
$form_suffix
$form_id
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$form_suffix

$form_suffix : null

Type

null

$form_id

$form_id : 

Type

Methods

__construct()

__construct() 

Form constructor.

ajax_muted_action()

ajax_muted_action() 

ajax_select_options()

ajax_select_options() 

count_errors()

count_errors() : integer

Count the form errors.

Returns

integer

add_error()

add_error(string  $key, string  $error) 

Appends field errors

Parameters

string $key
string $error

has_error()

has_error(string  $key) : boolean

If a form has errors

Parameters

string $key

Returns

boolean

field_declare()

field_declare() 

Declare all fields

form_init()

form_init() 

Validate form

beautify()

beautify(array  $form) : array

Beautify form data

Parameters

array $form

Returns

array —

$form

display_form_type()

display_form_type(string  $mode, integer  $post_id) : string

Display form type as Title

Parameters

string $mode
integer $post_id

Returns

string —

$output

assigned_role()

assigned_role(integer  $post_id) : string

Assigned roles to a form

Parameters

integer $post_id

Returns

string —

$role

form_type()

form_type(integer  $post_id) : string

Get form type

Parameters

integer $post_id

Returns

string

custom_field_roles()

custom_field_roles(string  $custom_fields) : boolean|array

Get custom field roles

Parameters

string $custom_fields

serialized

Returns

boolean|array —

roles