Skip to content

Instantly share code, notes, and snippets.

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