本文整理汇总了PHP中FrmFieldsHelper::pro_field_selection方法的典型用法代码示例。如果您正苦于以下问题:PHP FrmFieldsHelper::pro_field_selection方法的具体用法?PHP FrmFieldsHelper::pro_field_selection怎么用?PHP FrmFieldsHelper::pro_field_selection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrmFieldsHelper
的用法示例。
在下文中一共展示了FrmFieldsHelper::pro_field_selection方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_field_types
public static function get_field_types($type)
{
$frm_field_selection = FrmFieldsHelper::field_selection();
$field_types = array();
$single_input = array('text', 'textarea', 'rte', 'number', 'email', 'url', 'image', 'file', 'date', 'phone', 'hidden', 'time', 'user_id', 'tag', 'password');
$multiple_input = array('radio', 'checkbox', 'select', 'scale');
$other_type = array('divider', 'html', 'break');
$frm_pro_field_selection = FrmFieldsHelper::pro_field_selection();
if (in_array($type, $single_input)) {
foreach ($single_input as $input) {
if (isset($frm_pro_field_selection[$input])) {
$field_types[$input] = $frm_pro_field_selection[$input];
} else {
$field_types[$input] = $frm_field_selection[$input];
}
}
} else {
if (in_array($type, $multiple_input)) {
foreach ($multiple_input as $input) {
if (isset($frm_pro_field_selection[$input])) {
$field_types[$input] = $frm_pro_field_selection[$input];
} else {
$field_types[$input] = $frm_field_selection[$input];
}
}
} else {
if (in_array($type, $other_type)) {
foreach ($other_type as $input) {
if (isset($frm_pro_field_selection[$input])) {
$field_types[$input] = $frm_pro_field_selection[$input];
} else {
$field_types[$input] = $frm_field_selection[$input];
}
}
}
}
}
return $field_types;
}
示例2: options_form
function options_form($field, $display, $values)
{
global $frm_field, $frm_settings, $frm_ajax_url;
$form_fields = $frm_field->getAll("fi.form_id = " . $field['form_id'] . " and (type in ('select','radio','checkbox','10radio','scale','data') or (type = 'data' and (field_options LIKE '\"data_type\";s:6:\"select\"%' OR field_options LIKE '%\"data_type\";s:5:\"radio\"%' OR field_options LIKE '%\"data_type\";s:8:\"checkbox\"%') )) and fi.id != " . $field['id'], " ORDER BY field_order");
$post_type = FrmProForm::post_type($values);
if (function_exists('get_object_taxonomies')) {
$taxonomies = get_object_taxonomies($post_type);
}
$frm_field_selection = FrmFieldsHelper::field_selection();
$field_types = array();
$single_input = array('text', 'textarea', 'rte', 'number', 'email', 'url', 'image', 'file', 'date', 'phone', 'hidden', 'time', 'user_id', 'tag', 'password');
$multiple_input = array('radio', 'checkbox', 'select');
$other_type = array('divider', 'html', 'break');
if (in_array($field['type'], $single_input)) {
$frm_pro_field_selection = FrmFieldsHelper::pro_field_selection();
foreach ($single_input as $input) {
if (isset($frm_pro_field_selection[$input])) {
$field_types[$input] = $frm_pro_field_selection[$input];
} else {
$field_types[$input] = $frm_field_selection[$input];
}
}
} else {
if (in_array($field['type'], $multiple_input)) {
$frm_pro_field_selection = FrmFieldsHelper::pro_field_selection();
foreach ($multiple_input as $input) {
if (isset($frm_pro_field_selection[$input])) {
$field_types[$input] = $frm_pro_field_selection[$input];
} else {
$field_types[$input] = $frm_field_selection[$input];
}
}
} else {
if (in_array($field['type'], $other_type)) {
$frm_pro_field_selection = FrmFieldsHelper::pro_field_selection();
foreach ($other_type as $input) {
if (isset($frm_pro_field_selection[$input])) {
$field_types[$input] = $frm_pro_field_selection[$input];
} else {
$field_types[$input] = $frm_field_selection[$input];
}
}
}
}
}
if ($field['type'] == 'date') {
$locales = array('' => __('English/Western', 'formidable'), 'af' => __('Afrikaans', 'formidable'), 'sq' => __('Albanian', 'formidable'), 'ar' => __('Arabic', 'formidable'), 'hy' => __('Armenian', 'formidable'), 'az' => __('Azerbaijani', 'formidable'), 'eu' => __('Basque', 'formidable'), 'bs' => __('Bosnian', 'formidable'), 'bg' => __('Bulgarian', 'formidable'), 'ca' => __('Catalan', 'formidable'), 'zh-HK' => __('Chinese Hong Kong', 'formidable'), 'zh-CN' => __('Chinese Simplified', 'formidable'), 'zh-TW' => __('Chinese Traditional', 'formidable'), 'hr' => __('Croatian', 'formidable'), 'cs' => __('Czech', 'formidable'), 'da' => __('Danish', 'formidable'), 'nl' => __('Dutch', 'formidable'), 'en-GB' => __('English/UK', 'formidable'), 'eo' => __('Esperanto', 'formidable'), 'et' => __('Estonian', 'formidable'), 'fo' => __('Faroese', 'formidable'), 'fa' => __('Farsi/Persian', 'formidable'), 'fi' => __('Finnish', 'formidable'), 'fr' => __('French', 'formidable'), 'fr-CH' => __('French/Swiss', 'formidable'), 'de' => __('German', 'formidable'), 'el' => __('Greek', 'formidable'), 'he' => __('Hebrew', 'formidable'), 'hu' => __('Hungarian', 'formidable'), 'is' => __('Icelandic', 'formidable'), 'it' => __('Italian', 'formidable'), 'ja' => __('Japanese', 'formidable'), 'ko' => __('Korean', 'formidable'), 'lv' => __('Latvian', 'formidable'), 'lt' => __('Lithuanian', 'formidable'), 'ms' => __('Malaysian', 'formidable'), 'no' => __('Norwegian', 'formidable'), 'pl' => __('Polish', 'formidable'), 'pt-BR' => __('Portuguese/Brazilian', 'formidable'), 'ro' => __('Romanian', 'formidable'), 'ru' => __('Russian', 'formidable'), 'sr' => __('Serbian', 'formidable'), 'sr-SR' => __('Serbian', 'formidable'), 'sk' => __('Slovak', 'formidable'), 'sl' => __('Slovenian', 'formidable'), 'es' => __('Spanish', 'formidable'), 'sv' => __('Swedish', 'formidable'), 'ta' => __('Tamil', 'formidable'), 'th' => __('Thai', 'formidable'), 'tu' => __('Turkish', 'formidable'), 'uk' => __('Ukranian', 'formidable'), 'vi' => __('Vietnamese', 'formidable'));
} else {
if ($field['type'] == 'file') {
$mimes = get_allowed_mime_types();
}
}
require FRMPRO_VIEWS_PATH . '/frmpro-fields/options-form.php';
}
示例3: _e
?>
</ul>
<div class="clear"></div>
<h4 class="title" style="margin-bottom:0;"><?php
_e('Pro Fields', 'formidable');
?>
</h4>
<div class="clearfix">
<ul<?php
echo apply_filters('frm_drag_field_class', '');
?>
>
<?php
$col_class = 'frm_col_one';
foreach (FrmFieldsHelper::pro_field_selection() as $field_key => $field_type) {
?>
<li class="frmbutton button <?php
echo $col_class;
?>
frm_t<?php
echo $field_key;
?>
" id="<?php
echo $field_key;
?>
"><?php
echo apply_filters('frmpro_field_links', $field_type, $id, $field_key);
?>
</li>
<?php
示例4: htmlspecialchars
?>
" />
<span class="frm_hidden_fdata frm_hidden"><?php
echo htmlspecialchars(json_encode($field));
?>
</span>
</li>
<?php
return;
}
global $frm_settings;
if (!isset($frm_all_field_selection)) {
if (isset($frm_field_selection) and isset($frm_pro_field_selection)) {
$frm_all_field_selection = array_merge($frm_field_selection, $frm_pro_field_selection);
} else {
$frm_pro_field_selection = FrmFieldsHelper::pro_field_selection();
$frm_all_field_selection = array_merge(FrmFieldsHelper::field_selection(), $frm_pro_field_selection);
}
}
if (!isset($frm_vars)) {
global $frm_vars;
}
$disabled_fields = $frm_vars['pro_is_installed'] ? array() : $frm_pro_field_selection;
$display = apply_filters('frm_display_field_options', array('type' => $field['type'], 'field_data' => $field, 'required' => true, 'unique' => false, 'read_only' => false, 'description' => true, 'options' => true, 'label_position' => true, 'invalid' => false, 'size' => false, 'clear_on_focus' => false, 'default_blank' => true, 'css' => true));
if (!isset($ajax)) {
?>
<li id="frm_field_id_<?php
echo $field['id'];
?>
" class="form-field edit_form_item frm_field_box ui-state-default edit_field_type_<?php
echo $display['type'];