Skip to content

Instantly share code, notes, and snippets.

View bappi-d-great's full-sized avatar

Bappi D great bappi-d-great

View GitHub Profile
@bappi-d-great
bappi-d-great / code.php
Created July 4, 2018 08:23
Use country list in forminator
<?php
add_filter( 'forminator_field_single_markup', function( $html, $id, $required, $options, $value_type ) {
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
@bappi-d-great
bappi-d-great / update_poll.php
Last active July 6, 2018 07:53
update_poll
<?php
$answers = array(
array(
"title" => "Tester 1",
"element_id" => "answer-1"
),
array(
"title" => "Tester 2",
"element_id" => "answer-2",
<?php
$answers = array(
array(
"title" => "Tester 1",
"element_id" => "answer-1"
),
array(
"title" => "Tester 2",
"element_id" => "answer-2",
<?php
$poll_ids = array( 12, 34, 56, 78, 90 );
$poll = Forminator_API::delete_polls( $poll_ids );
<?php
$poll_id = 65;
$form = Forminator_API::delete_poll( $poll_id );
<?php
$poll_id = 23;
$poll = Forminator_API::get_poll( $poll_id );
@bappi-d-great
bappi-d-great / update_form.php
Last active July 6, 2018 07:54
update_form
<?php
$wrappers = array(
array(
'wrapper_id' => 'wrapper-1511378776546-9087',
'fields' => array(
array(
'element_id' => 'name-1',
'type' => 'name',
'cols' => '12',
<?php
$wrappers = array(
array(
'wrapper_id' => 'wrapper-1511378776546-9087',
'fields' => array(
array(
'element_id' => 'name-1',
'type' => 'name',
'cols' => '12',
<?php
$form_ids = array( 12, 34, 56, 78, 90 );
$forms = Forminator_API::delete_forms( $form_ids ); // Method 1 to delete specific forms
$forms = Forminator_API::delete_forms(12, 34, 56, 78, 90 ); // Method 2 to delete specific forms
@bappi-d-great
bappi-d-great / get_form.php
Created June 25, 2018 18:54
get_form.php
<?php
$form_id = 35;
$form = Forminator_API::get_form( $form_id );