本文整理汇总了PHP中FrmField::is_multiple_select方法的典型用法代码示例。如果您正苦于以下问题:PHP FrmField::is_multiple_select方法的具体用法?PHP FrmField::is_multiple_select怎么用?PHP FrmField::is_multiple_select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrmField
的用法示例。
在下文中一共展示了FrmField::is_multiple_select方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: include_blank_option
/**
* A dropdown field should include a blank option if it is not multiselect
* unless it autocomplete is also enabled
*
* @since 2.0
* @return boolean
*/
public static function include_blank_option($options, $field)
{
if (empty($options) || $field->type != 'data') {
return false;
}
if (!isset($field->field_options['data_type']) || $field->field_options['data_type'] != 'select') {
return false;
}
return !FrmField::is_multiple_select($field) || FrmField::is_option_true($field, 'autocom');
}
示例2: is_multiple_select
public static function is_multiple_select($field)
{
_deprecated_function(__FUNCTION__, '2.0.9', 'FrmField::is_multiple_select');
return FrmField::is_multiple_select($field);
}
示例3: ajax_data_options
/**
* Get the HTML for a dependent Dynamic field when the parent changes
*/
public static function ajax_data_options()
{
//check_ajax_referer( 'frm_ajax', 'nonce' );
$args = array('trigger_field_id' => FrmAppHelper::get_param('trigger_field_id', '', 'post', 'absint'), 'entry_id' => FrmAppHelper::get_param('entry_id'), 'field_id' => FrmAppHelper::get_param('field_id', '', 'post', 'absint'), 'container_id' => FrmAppHelper::get_param('container_id', '', 'post', 'sanitize_title'), 'linked_field_id' => FrmAppHelper::get_param('linked_field_id', '', 'post', 'sanitize_title'), 'default_value' => FrmAppHelper::get_param('default_value', '', 'post', 'sanitize_title'), 'prev_val' => FrmAppHelper::get_param('prev_val', '', 'post', 'absint'));
if ($args['entry_id'] == '') {
wp_die();
}
if (!is_array($args['entry_id'])) {
$entry_id = explode(',', $args['entry_id']);
}
$args['field_data'] = FrmField::getOne($args['field_id']);
$field = self::initialize_dependent_dynamic_field($args);
if (is_numeric($args['linked_field_id'])) {
// If Dynamic field is pulling options from a regular field
self::get_dependent_dynamic_field_options($args, $field);
} else {
if ($args['linked_field_id'] == 'taxonomy') {
// If Dynamic field is pulling options from a taxonomy
self::get_dependent_category_field_options($args, $field);
}
}
self::get_dependent_dynamic_field_value($args['prev_val'], $field);
// Set up HTML ID and HTML name
$html_id = '';
$field_name = 'item_meta';
FrmProFieldsHelper::get_html_id_from_container($field_name, $html_id, $field, $args['container_id']);
if (FrmField::is_multiple_select($args['field_data'])) {
$field_name .= '[]';
}
$auto_width = isset($field['size']) && $field['size'] > 0 ? 'class="auto_width"' : '';
require FrmAppHelper::plugin_path() . '/pro/classes/views/frmpro-fields/data-options.php';
wp_die();
}