Пример #1
0
 function feed_settings_fields()
 {
     if (is_numeric($_GET['id'])) {
         $feed_form_id = $_GET['id'];
         $form = GFAPI::get_form($feed_form_id);
     }
     $args = array('field_types' => array(), 'input_types' => array('text', 'name', 'email'), 'callback' => false);
     $fields = GFAddOn::get_form_fields_as_choices($form, $args);
     return array(array('title' => 'Postmatic', 'fields' => array(array('name' => 'feed_name', 'label' => 'Feed Name', 'type' => 'text'), array('name' => 'first_name', 'label' => 'First Name Field', 'type' => 'select', 'choices' => $fields), array('name' => 'last_name', 'label' => 'Last Name Field', 'type' => 'select', 'choices' => $fields), array('name' => 'email', 'label' => 'Email Field', 'type' => 'select', 'choices' => $fields, 'required' => true), array('name' => 'condition', 'tooltip' => "Configure the event that riggers the user to be subscribed to your Postmatic feed.", 'label' => 'Condition', 'type' => 'feed_condition', 'checkbox_label' => 'Enable condition for this subscription', 'instructions' => 'Subscribe this user if'))));
 }