当前位置: 首页>>代码示例>>PHP>>正文


PHP FrmField::field_selection方法代码示例

本文整理汇总了PHP中FrmField::field_selection方法的典型用法代码示例。如果您正苦于以下问题:PHP FrmField::field_selection方法的具体用法?PHP FrmField::field_selection怎么用?PHP FrmField::field_selection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FrmField的用法示例。


在下文中一共展示了FrmField::field_selection方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: test_create

 function test_create()
 {
     $form_id = $this->factory->form->get_id_by_key('contact-db12');
     $field_types = array_merge(FrmField::field_selection(), FrmField::pro_field_selection());
     foreach ($field_types as $field_type => $field_info) {
         $field_id = $this->factory->field->create(array('type' => $field_type, 'form_id' => $form_id));
         $this->assertTrue(is_numeric($field_id));
         $this->assertTrue($field_id > 0);
     }
 }
开发者ID:rbkhrlstn,项目名称:formidable-forms,代码行数:10,代码来源:test_FrmField.php

示例2: change_type

 public static function change_type($type)
 {
     $type_switch = array('scale' => 'radio', '10radio' => 'radio', 'rte' => 'textarea', 'website' => 'url');
     if (isset($type_switch[$type])) {
         $type = $type_switch[$type];
     }
     $frm_field_selection = FrmField::field_selection();
     $types = array_keys($frm_field_selection);
     if (!in_array($type, $types) && $type != 'captcha') {
         $type = 'text';
     }
     return $type;
 }
开发者ID:EyesX,项目名称:formidable-forms,代码行数:13,代码来源:FrmFieldsController.php

示例3: get_edit_vars

 private static function get_edit_vars($id, $errors = array(), $message = '', $create_link = false)
 {
     global $frm_vars;
     $form = FrmForm::getOne($id);
     if (!$form) {
         wp_die(__('You are trying to edit a form that does not exist.', 'formidable'));
     }
     if ($form->parent_form_id) {
         wp_die(sprintf(__('You are trying to edit a child form. Please edit from %1$shere%2$s', 'formidable'), '<a href="' . esc_url(admin_url('admin.php') . '?page=formidable&frm_action=edit&id=' . $form->parent_form_id) . '">', '</a>'));
     }
     $frm_field_selection = FrmField::field_selection();
     $fields = FrmField::get_all_for_form($form->id);
     // Automatically add end section fields if they don't exist (2.0 migration)
     $reset_fields = false;
     FrmFormsHelper::auto_add_end_section_fields($form, $fields, $reset_fields);
     if ($reset_fields) {
         $fields = FrmField::get_all_for_form($form->id, '', 'exclude');
     }
     unset($end_section_values, $last_order, $open, $reset_fields);
     $values = FrmAppHelper::setup_edit_vars($form, 'forms', $fields, true);
     $edit_message = __('Form was Successfully Updated', 'formidable');
     if ($form->is_template && $message == $edit_message) {
         $message = __('Template was Successfully Updated', 'formidable');
     }
     $all_templates = FrmForm::getAll(array('is_template' => 1), 'name');
     if ($form->default_template) {
         wp_die(__('That template cannot be edited', 'formidable'));
     } else {
         if (defined('DOING_AJAX')) {
             wp_die();
         } else {
             if ($create_link) {
                 require FrmAppHelper::plugin_path() . '/classes/views/frm-forms/new.php';
             } else {
                 require FrmAppHelper::plugin_path() . '/classes/views/frm-forms/edit.php';
             }
         }
     }
 }
开发者ID:swc-dng,项目名称:swcsandbox,代码行数:39,代码来源:FrmFormsController.php

示例4: field_selection

 public static function field_selection()
 {
     _deprecated_function(__FUNCTION__, '2.0.9', 'FrmField::field_selection');
     return FrmField::field_selection();
 }
开发者ID:EyesX,项目名称:formidable-forms,代码行数:5,代码来源:FrmFieldsHelper.php

示例5: htmlspecialchars

" />
<span class="frm_hidden_fdata frm_hidden"><?php 
    echo htmlspecialchars(json_encode($field));
    ?>
</span>
</li>
<?php 
    return;
}
$frm_settings = FrmAppHelper::get_settings();
if (!isset($frm_all_field_selection)) {
    if (isset($frm_field_selection) && isset($pro_field_selection)) {
        $frm_all_field_selection = array_merge($frm_field_selection, $pro_field_selection);
    } else {
        $pro_field_selection = FrmField::pro_field_selection();
        $frm_all_field_selection = array_merge(FrmField::field_selection(), $pro_field_selection);
    }
}
$disabled_fields = FrmAppHelper::pro_is_installed() ? array() : $pro_field_selection;
if (!isset($ajax)) {
    $li_classes .= ' ui-state-default widgets-holder-wrap';
    ?>
<li id="frm_field_id_<?php 
    echo esc_attr($field['id']);
    ?>
" class="<?php 
    echo esc_attr($li_classes);
    ?>
" data-fid="<?php 
    echo esc_attr($field['id']);
    ?>
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:31,代码来源:add_field.php


注:本文中的FrmField::field_selection方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。