Skip to main content

GF_Field_Image_Choice

Source: includes/fields/class-gf-field-image-choice.php:9

Details

Methods

MethodDescription
get_form_editor_field_description()Returns the field's form editor description.
get_form_editor_field_icon()Returns the field's form editor icon.
resize_images_after_import()Trigger the resizing of images after form import.
get_image_choice_label_visibility_setting_default()Get the choice labels visibility setting default for the image choice field.
get_image_choice_label_visibility_setting()Get the choice labels visibility setting for the given image choice field.
get_image_choice_input_visibility_setting()Get the choice inputs visibility setting for the given image choice field.
get_merge_tag_img_url()Returns the image URL for a choice to display in a merge tage with the "img_url" modifier.

Method Reference

get_form_editor_field_description()

public function get_form_editor_field_description()

Returns the field's form editor description.

Returns

  • string

Since: 2.5

Source: includes/fields/class-gf-field-image-choice.php:38

get_form_editor_field_icon()

public function get_form_editor_field_icon()

Returns the field's form editor icon.

This could be an icon url or a gform-icon class.

Returns

  • string

Since: 2.5

Source: includes/fields/class-gf-field-image-choice.php:51

resize_images_after_import()

public static function resize_images_after_import( $forms )

Trigger the resizing of images after form import.

Parameters

NameTypeDefaultDescription
$formsarrayThe forms being imported.

Since: 2.9.3

Source: includes/fields/class-gf-field-image-choice.php:121

get_image_choice_label_visibility_setting_default()

public static function get_image_choice_label_visibility_setting_default( $form_id )

Get the choice labels visibility setting default for the image choice field.

Parameters

NameTypeDefaultDescription
$form_id
$fieldobjectThe field object.

Returns

  • string

Since: 2.9.0

Source: includes/fields/class-gf-field-image-choice.php:141

get_image_choice_label_visibility_setting()

public static function get_image_choice_label_visibility_setting( $field )

Get the choice labels visibility setting for the given image choice field.

Parameters

NameTypeDefaultDescription
$fieldobjectThe field object.

Returns

  • string

Since: 2.9.0

Source: includes/fields/class-gf-field-image-choice.php:164

get_image_choice_input_visibility_setting()

public static function get_image_choice_input_visibility_setting( $field )

Get the choice inputs visibility setting for the given image choice field.

Parameters

NameTypeDefaultDescription
$fieldobjectThe field object.

Returns

  • string

Since: 2.9.0

Source: includes/fields/class-gf-field-image-choice.php:177

get_merge_tag_img_url()

public function get_merge_tag_img_url( $value, $input_id, $entry, $form, $field )

Returns the image URL for a choice to display in a merge tage with the "img_url" modifier.

Parameters

NameTypeDefaultDescription
$valuestringThe value of the merge tag.
$input_idstringThe ID of the input.
$entryarrayThe entry currently being processed.
$formarrayThe form currently being processed.
$fieldobjectThe field currently being processed.

Returns

  • string | array

Since: 2.9.0

Source: includes/fields/class-gf-field-image-choice.php:249