本文整理匯總了PHP中GFAddOn::get_form_fields_as_choices方法的典型用法代碼示例。如果您正苦於以下問題:PHP GFAddOn::get_form_fields_as_choices方法的具體用法?PHP GFAddOn::get_form_fields_as_choices怎麽用?PHP GFAddOn::get_form_fields_as_choices使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GFAddOn
的用法示例。
在下文中一共展示了GFAddOn::get_form_fields_as_choices方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: feed_settings_fields
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'))));
}