Skip to content

Instantly share code, notes, and snippets.

@bappi-d-great
Created July 30, 2018 20:31
Show Gist options
  • Save bappi-d-great/5102b22307a576d2701b32195a2501a9 to your computer and use it in GitHub Desktop.
Save bappi-d-great/5102b22307a576d2701b32195a2501a9 to your computer and use it in GitHub Desktop.
Method: add_form_field
<?php
$data = array(
'condition_action' => 'show',
'condition_rule' => 'any',
'conditions' => Array
(
),
'type' => 'email',
'options' => Array
(
),
'cols' => '12',
'validation' => '',
'placeholder' => 'E.g. [email protected]',
'field_label' => 'Third Email Address',
'description' => '',
'validation_text' => '',
'custom-class' => ''
);
$form_id = 7;
$type = 'email';
$fields = Forminator_API::add_form_field( $form_id, $type, $data );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment