GravityKit\EventField\EventField
Source: src/EventField.php:17
Details
- Kind:
class - Namespace:
GravityKit\EventField - Extends: GF_Field
Properties
| Property | Type | Description |
|---|---|---|
$type | string | The field type. |
$field_inputs | array | Inputs used by the field. |
Methods
Method Reference
__construct()
public function __construct( $data=[] )
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$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
| Name | Type | Default | Description |
|---|---|---|---|
$repeat | string | The 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
| Name | Type | Default | Description |
|---|---|---|---|
$input_visibility | mixed | The input visibility value. | |
$default | bool | true | (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
| Name | Type | Default | Description |
|---|---|---|---|
$values | array | The 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
| Name | Type | Default | Description |
|---|---|---|---|
$form | |||
$value | '' | ||
$entry | null |
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
| Name | Type | Default | Description |
|---|---|---|---|
$value | array | string | Input options. | |
$form_id | int | The 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
| Name | Type | Default | Description |
|---|---|---|---|
$key | string | The key of the input. | |
$input | array | The input field. | |
$form_id | int | The form ID. | |
$value | array | The 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
| Name | Type | Default | Description |
|---|---|---|---|
$key | string | The key of the input. | |
$values | array | The 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
| Name | Type | Default | Description |
|---|---|---|---|
$value | |||
$currency | '' | ||
$use_text | false | ||
$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
| Name | Type | Default | Description |
|---|---|---|---|
$entry | |||
$input_id | '' | ||
$use_text | false | ||
$is_csv | false |
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
| Name | Type | Default | Description |
|---|---|---|---|
$date | string | The date string to convert. |
Returns
string
Since: 1.0.0
Source: src/EventField.php:794
validate()
function validate( $value, $form )
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$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
| Name | Type | Default | Description |
|---|---|---|---|
$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
| Name | Type | Default | Description |
|---|---|---|---|
$input_key | string | The 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
| Name | Type | Default | Description |
|---|---|---|---|
$value | |||
$entry | |||
$field_id | |||
$columns | |||
$form |
Returns
string
Since: 1.0.0
Source: src/EventField.php:1194