Skip to main content

GravityKit\EventField\EventField

Source: src/EventField.php:17

Details​

  • Kind: class
  • Namespace: GravityKit\EventField
  • Extends: GF_Field

Properties​

PropertyTypeDescription
$typestringThe field type.
$field_inputsarrayInputs used by the field.

Methods​

MethodDescription
__construct()
date_interval_from_cron()Returns a {@see DateInterval} string from a cron string.
get_field_inputs()Returns inputs used by the field.
is_input_visible()Determines the visibility of the input based on the provided value.
get_field_key_id_map()Returns the field key id map.
prepare_field_name_value_map()Returns the field name value map.
convert_date_format()Converts the date format to the format used by the datepicker.
get_form_editor_button()
get_form_editor_field_title()
get_form_editor_field_settings()
is_conditional_logic_supported()
get_field_input()
format_inputs()Formats field inputs for display.
configure_input()Configures input for display.
get_input_value_by_key()Returns the value using the named key.
get_form_editor_inline_script_on_page_render()Initializes field inputs in the form editor.
get_value_entry_detail()
get_value_export()
get_filter_sub_filters()
get_date_in_standard_format()Converts date formats into the standard 'Y-m-d' format.
validate()
get_required_inputs_ids()
get_value_save_input()
get_value_save_entry()
get_post_value_by_key()Gets input value using human-readable names.
get_form_editor_field_description()
get_form_editor_field_icon()
get_value_entry_list()

Method Reference​

__construct()​

public function __construct( $data=[] )

Parameters​

NameTypeDefaultDescription
$data[]

Source: src/EventField.php:35

date_interval_from_cron()​

public static function date_interval_from_cron( string $repeat ): string

Returns a {@see DateInterval} string from a cron string.

Parameters​

NameTypeDefaultDescription
$repeatstringThe cron string.

Returns​

  • string — The interval string.

Since: 1.1.0

Source: src/EventField.php:76

get_field_inputs()​

public function get_field_inputs()

Returns inputs used by the field.

Returns​

  • array

Since: 1.0.0

Source: src/EventField.php:114

is_input_visible()​

public function is_input_visible( $input_visibility, bool $default=true ): bool

Determines the visibility of the input based on the provided value.

Parameters​

NameTypeDefaultDescription
$input_visibilitymixedThe input visibility value.
$defaultbooltrue(optional) Default visibility. Set to true.

Returns​

  • bool

Since: 1.0.0

Source: src/EventField.php:126

get_field_key_id_map()​

public function get_field_key_id_map()

Returns the field key id map.

Returns​

  • array

Since: 1.0.0

Source: src/EventField.php:137

prepare_field_name_value_map()​

public function prepare_field_name_value_map( $values )

Returns the field name value map.

Parameters​

NameTypeDefaultDescription
$valuesarrayThe values of the input.

Returns​

  • array

Since: 1.0.0

Source: src/EventField.php:158

convert_date_format()​

public function convert_date_format()

Converts the date format to the format used by the datepicker.

Returns​

  • string

Since: 1.0.0

Source: src/EventField.php:303

get_form_editor_button()​

public function get_form_editor_button()

Since: 1.0.0

Source: src/EventField.php:336

get_form_editor_field_title()​

public function get_form_editor_field_title()

Since: 1.0.0

Source: src/EventField.php:348

get_form_editor_field_settings()​

public function get_form_editor_field_settings()

Since: 1.0.0

Source: src/EventField.php:357

is_conditional_logic_supported()​

public function is_conditional_logic_supported()

Since: 1.0.0

Source: src/EventField.php:376

get_field_input()​

public function get_field_input( $form, $value='', $entry=null )

Parameters​

NameTypeDefaultDescription
$form
$value''
$entrynull

Since: 1.0.0

Source: src/EventField.php:385

format_inputs()​

public function format_inputs( $value, $form_id ): array

Formats field inputs for display.

Parameters​

NameTypeDefaultDescription
$valuearray | stringInput options.
$form_idintThe form ID.

Returns​

  • array

Since: 1.0.0

Source: src/EventField.php:482

configure_input()​

public function configure_input( $key, $input, $form_id, $value )

Configures input for display.

Parameters​

NameTypeDefaultDescription
$keystringThe key of the input.
$inputarrayThe input field.
$form_idintThe form ID.
$valuearrayThe value of the input.

Returns​

  • array

Since: 1.0.0

Source: src/EventField.php:505

get_input_value_by_key()​

public function get_input_value_by_key( $key, $values )

Returns the value using the named key.

Parameters​

NameTypeDefaultDescription
$keystringThe key of the input.
$valuesarrayThe values of the input.

Returns​

  • string | void

Since: 1.0.0

Source: src/EventField.php:605

get_form_editor_inline_script_on_page_render()​

public function get_form_editor_inline_script_on_page_render()

Initializes field inputs in the form editor.

Returns​

  • string

Since: 1.0.0

Source: src/EventField.php:692

get_value_entry_detail()​

public function get_value_entry_detail( $value, $currency='', $use_text=false, $format='html', $media='screen' )

Parameters​

NameTypeDefaultDescription
$value
$currency''
$use_textfalse
$format'html'
$media'screen'

Since: 1.0.0

Source: src/EventField.php:718

get_value_export()​

public function get_value_export( $entry, $input_id='', $use_text=false, $is_csv=false )

Parameters​

NameTypeDefaultDescription
$entry
$input_id''
$use_textfalse
$is_csvfalse

Since: 1.1.0

Source: src/EventField.php:769

get_filter_sub_filters()​

public function get_filter_sub_filters(): array

Returns​

  • array

Since: 1.1.0

Source: src/EventField.php:821

get_date_in_standard_format()​

public function get_date_in_standard_format( $date )

Converts date formats into the standard 'Y-m-d' format.

Parameters​

NameTypeDefaultDescription
$datestringThe date string to convert.

Returns​

  • string

Since: 1.0.0

Source: src/EventField.php:845

validate()​

function validate( $value, $form )

Parameters​

NameTypeDefaultDescription
$value
$form

Since: 1.0.0

Source: src/EventField.php:979

get_required_inputs_ids()​

public function get_required_inputs_ids()

Since: 1.0.0

Source: src/EventField.php:1008

get_value_save_input()​

public function get_value_save_input( $value, $form, $input_name, $entry_id, $entry, $repeater_index='' )

Parameters​

NameTypeDefaultDescription
$value
$form
$input_name
$entry_id
$entry
$repeater_index''

Since: 1.6.1

Source: src/EventField.php:1036

get_value_save_entry()​

public function get_value_save_entry( $value, $form, $input_name, $lead_id, $lead )

Parameters​

NameTypeDefaultDescription
$value
$form
$input_name
$lead_id
$lead

Since: 1.0.0

Source: src/EventField.php:1045

get_post_value_by_key()​

public function get_post_value_by_key( $input_key )

Gets input value using human-readable names.

Parameters​

NameTypeDefaultDescription
$input_keystringThe input key.

Returns​

  • false | mixed

Since: 1.0.0

Source: src/EventField.php:1285

get_form_editor_field_description()​

public function get_form_editor_field_description()

Since: 1.0.0

Source: src/EventField.php:1296

get_form_editor_field_icon()​

public function get_form_editor_field_icon()

Returns​

  • string

Since: 1.0.0

Source: src/EventField.php:1307

get_value_entry_list()​

public function get_value_entry_list( $value, $entry, $field_id, $columns, $form )

Parameters​

NameTypeDefaultDescription
$value
$entry
$field_id
$columns
$form

Returns​

  • string

Since: 1.0.0

Source: src/EventField.php:1318