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_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:50

get_field_inputs()

public function get_field_inputs()

Returns inputs used by the field.

Returns

  • array

Since: 1.0.0

Source: src/EventField.php:88

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:100

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:111

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:132

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:277

get_form_editor_button()

public function get_form_editor_button()

Since: 1.0.0

Source: src/EventField.php:310

get_form_editor_field_title()

public function get_form_editor_field_title()

Since: 1.0.0

Source: src/EventField.php:322

get_form_editor_field_settings()

public function get_form_editor_field_settings()

Since: 1.0.0

Source: src/EventField.php:331

is_conditional_logic_supported()

public function is_conditional_logic_supported()

Since: 1.0.0

Source: src/EventField.php:350

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:359

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:456

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:479

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:565

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:644

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:670

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:718

get_filter_sub_filters()

public function get_filter_sub_filters(): array

Returns

  • array

Since: 1.1.0

Source: src/EventField.php:770

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:794

validate()

function validate( $value, $form )

Parameters

NameTypeDefaultDescription
$value
$form

Since: 1.0.0

Source: src/EventField.php:928

get_required_inputs_ids()

public function get_required_inputs_ids()

Since: 1.0.0

Source: src/EventField.php:956

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:984

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:1161

get_form_editor_field_description()

public function get_form_editor_field_description()

Since: 1.0.0

Source: src/EventField.php:1172

get_form_editor_field_icon()

public function get_form_editor_field_icon()

Returns

  • string

Since: 1.0.0

Source: src/EventField.php:1183

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:1194