Skip to main content

GravityKit\GravityMigrate\Platforms\FormidableForms\FormidableFormsExporter

Exports Gravity Forms forms to Formidable Forms.

Since: %ver%

Source: src/Platforms/FormidableForms/FormidableFormsExporter.php:25

Details

  • Kind: class
  • Namespace: GravityKit\GravityMigrate\Platforms\FormidableForms
  • Extends: AbstractExporter

Properties

PropertyTypeDescription
$target_adapterTargetAdapterInterface | nullTarget adapter instance.

Methods

MethodDescription
analyze_form()Reports what the requested Gravity Forms form loses on the way to the target provider.
export_form()Exports a Gravity Forms form to the target provider.
get_target_adapter()Returns target adapter.
resolved_product_field()Reads a quantity's product list back as the ids Formidable assigned.

Method Reference

analyze_form()

public function analyze_form( $form_id, array $args=[] )

Reports what the requested Gravity Forms form loses on the way to the target provider.

Parameters

NameTypeDefaultDescription
$form_idmixedGravity Forms form identifier.
$argsarray[]Optional request arguments.

Returns

  • array | WP_Error — Field notices and warnings, or WP_Error when the form cannot be read.

Since: %ver%

Source: src/Platforms/FormidableForms/FormidableFormsExporter.php:51

export_form()

public function export_form( $form_id, array $args=[] )

Exports a Gravity Forms form to the target provider.

Parameters

NameTypeDefaultDescription
$form_idmixedGravity Forms form identifier.
$argsarray[]Optional request arguments.

Returns

  • array | WP_Errortarget_form_id, edit_url and issues for the created form, or WP_Error describing the failure.

Since: %ver%

Source: src/Platforms/FormidableForms/FormidableFormsExporter.php:78

get_target_adapter()

public function get_target_adapter(): TargetAdapterInterface

Returns target adapter.

Returns

  • TargetAdapterInterface

Since: %ver%

Source: src/Platforms/FormidableForms/FormidableFormsExporter.php:197

resolved_product_field()

public static function resolved_product_field( array $product_field, array $created_field_ids ): array

Reads a quantity's product list back as the ids Formidable assigned.

Entries are written as strings because that is what Formidable itself writes -- duplication casts each one (FrmProField::switch_quantity_product_field_ids:190) and the settings screen posts them as checkbox values (quantity-options.php:15).

A value that is not a placeholder is left as it is rather than dropped: a round trip puts a real id back through restore_original_for_round_trip(), and rewriting it would break the link this method exists to keep.

Parameters

NameTypeDefaultDescription
$product_fieldarrayWhatever the field carries in product_field.
$created_field_idsarrayField position to new Formidable field id.

Returns

  • string[] — The product field ids, as Formidable stores them.

Since: %ver%

Source: src/Platforms/FormidableForms/FormidableFormsExporter.php:420