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


PHP ninja_forms_edit_field_el_output函数代码示例

本文整理汇总了PHP中ninja_forms_edit_field_el_output函数的典型用法代码示例。如果您正苦于以下问题:PHP ninja_forms_edit_field_el_output函数的具体用法?PHP ninja_forms_edit_field_el_output怎么用?PHP ninja_forms_edit_field_el_output使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: ninja_forms_user_info_fields_groups

function ninja_forms_user_info_fields_groups($field_id, $field_data)
{
    global $ninja_forms_fields;
    $field = ninja_forms_get_field_by_id($field_id);
    $field_type = $field['type'];
    $default_user_info = 0;
    if (isset($ninja_forms_fields[$field_type]['edit_options']) and is_array($ninja_forms_fields[$field_type]['edit_options'])) {
        foreach ($ninja_forms_fields[$field_type]['edit_options'] as $option) {
            if (isset($option['name']) and $option['name'] == 'user_info_field_group' and isset($option['default'])) {
                $default_user_info = $option['default'];
                break;
            }
        }
    }
    if (isset($field_data['user_info_field_group']) and $field_data['user_info_field_group'] == 1 or (!isset($field_data['user_info_field_group']) or $field_data['user_info_field_group'] !== 0) and $default_user_info == 1) {
        $options = array(array('name' => '- ' . __('None', 'ninja-forms'), 'value' => ''), array('name' => __('Billing', 'ninja-forms'), 'value' => 'billing'), array('name' => __('Shipping', 'ninja-forms'), 'value' => 'shipping'), array('name' => __('Custom', 'ninja-forms') . ' ->', 'value' => 'custom'));
        if (isset($field_data['user_info_field_group_name'])) {
            $group_name = $field_data['user_info_field_group_name'];
        } else {
            $group_name = '';
        }
        if (isset($field_data['user_info_field_group_custom'])) {
            $group_custom = $field_data['user_info_field_group_custom'];
        } else {
            $group_custom = '';
        }
        if ($group_name == 'custom') {
            $custom_class = '';
        } else {
            $custom_class = 'hidden';
        }
        ninja_forms_edit_field_el_output($field_id, 'select', __('User Info Field Group', 'ninja-forms'), 'user_info_field_group_name', $group_name, 'thin', $options, 'user-info-group-name widefat');
        ninja_forms_edit_field_el_output($field_id, 'text', __('Custom Field Group', 'ninja-forms'), 'user_info_field_group_custom', $group_custom, 'thin', '', 'user-info-custom-group widefat ' . $custom_class, '', $custom_class);
    }
}
开发者ID:nihrain,项目名称:accelerate,代码行数:35,代码来源:user-info-fields.php

示例2: nf_edit_field_sub_settings

function nf_edit_field_sub_settings($field_id)
{
    global $ninja_forms_fields;
    $field_row = ninja_forms_get_field_by_id($field_id);
    $field_type = $field_row['type'];
    if ($ninja_forms_fields[$field_type]['process_field']) {
        if (isset($field_row['data']['admin_label'])) {
            $admin_label = $field_row['data']['admin_label'];
        } else {
            $admin_label = '';
        }
        if (isset($field_row['data']['num_sort'])) {
            $num_sort = $field_row['data']['num_sort'];
        } else {
            $num_sort = '';
        }
        ?>
		<div class="description description-wide">
		<hr>
		<h5><?php 
        _e('Submission Settings', 'ninja-forms');
        ?>
</h5>
		<?php 
        ninja_forms_edit_field_el_output($field_id, 'text', __('Admin Label', 'ninja-forms'), 'admin_label', $admin_label, 'wide', '', 'widefat code', __('This is the label used when viewing/editing/exporting submissions.', 'ninja-forms'));
        ninja_forms_edit_field_el_output($field_id, 'checkbox', __('Sort as numeric', 'ninja-forms'), 'num_sort', $num_sort, 'wide', '', '', __('If this box is checked, this column in the submissions table will sort by number.', 'ninja-forms'));
    }
}
开发者ID:serker72,项目名称:T3S,代码行数:28,代码来源:sub-settings.php

示例3: ninja_forms_edit_field_input_limit

/**
 * Function that adds a character and word limit option to textboxes and textareas.
 *
 * @since 2.4.3
 * @return void
 */
function ninja_forms_edit_field_input_limit($field_id, $field_data)
{
    $field_row = ninja_forms_get_field_by_id($field_id);
    $field_type = $field_row['type'];
    $allowed_types = apply_filters('nf_input_limit_types', array('_text', '_textarea'));
    if (!in_array($field_type, $allowed_types)) {
        return false;
    }
    if (isset($field_data['input_limit'])) {
        $input_limit = $field_data['input_limit'];
    } else {
        $input_limit = '';
    }
    if (isset($field_data['input_limit_type'])) {
        $input_limit_type = $field_data['input_limit_type'];
    } else {
        $input_limit_type = '';
    }
    if (isset($field_data['input_limit_msg'])) {
        $input_limit_msg = $field_data['input_limit_msg'];
    } else {
        $input_limit_msg = '';
    }
    $desc = '<em>' . __('If you leave the box empty, no limit will be used', 'ninja-forms') . '</em>';
    ninja_forms_edit_field_el_output($field_id, 'text', __('Limit input to this number', 'ninja-forms'), 'input_limit', $input_limit, 'thin', '', 'widefat', $desc);
    ninja_forms_edit_field_el_output($field_id, 'select', __('of', 'ninja-forms'), 'input_limit_type', $input_limit_type, 'thin', array(array('name' => __('Characters', 'ninja-forms'), 'value' => 'char'), array('name' => __('Words', 'ninja-forms'), 'value' => 'word')), 'widefat');
    echo '<p class="description description-wide">&nbsp;</p>';
    ninja_forms_edit_field_el_output($field_id, 'text', __('Text to appear after character/word counter', 'ninja-forms'), 'input_limit_msg', $input_limit_msg, 'wide', '', 'widefat');
}
开发者ID:RA2WP,项目名称:RA2WP,代码行数:35,代码来源:input-limit.php

示例4: nf_edit_field_admin_label

function nf_edit_field_admin_label($field_id, $field_data)
{
    global $ninja_forms_fields;
    $field_row = ninja_forms_get_field_by_id($field_id);
    $field_type = $field_row['type'];
    if ($ninja_forms_fields[$field_type]['process_field']) {
        if (isset($field_data['admin_label'])) {
            $admin_label = $field_data['admin_label'];
        } else {
            $admin_label = '';
        }
        if (isset($field_data['num_sort'])) {
            $num_sort = $field_data['num_sort'];
        } else {
            $num_sort = '';
        }
        ?>
		<div class="description description-wide">
		<?php 
        ninja_forms_edit_field_el_output($field_id, 'text', __('Admin Label', 'ninja-forms'), 'admin_label', $admin_label, 'wide', '', 'widefat code', __('This is the label used when viewing/editing/exporting submissions.', 'ninja-forms'));
        ?>
		</div>
		<?php 
    }
}
开发者ID:ramiy,项目名称:ninja-forms,代码行数:25,代码来源:sub-settings.php

示例5: ninja_forms_edit_field_input_limit

/**
 * Function that adds a character and word limit option to textboxes and textareas.
 *
 * @since 2.4.3
 * @return void
 */
function ninja_forms_edit_field_input_limit($field_id)
{
    $field_row = ninja_forms_get_field_by_id($field_id);
    $field_type = $field_row['type'];
    $allowed_types = apply_filters('nf_input_limit_types', array('_text', '_textarea'));
    if (!in_array($field_type, $allowed_types)) {
        return false;
    }
    $field_data = $field_row['data'];
    if (isset($field_data['input_limit'])) {
        $input_limit = $field_data['input_limit'];
    } else {
        $input_limit = '';
    }
    if (isset($field_data['input_limit_type'])) {
        $input_limit_type = $field_data['input_limit_type'];
    } else {
        $input_limit_type = '';
    }
    if (isset($field_data['input_limit_msg'])) {
        $input_limit_msg = $field_data['input_limit_msg'];
    } else {
        $input_limit_msg = '';
    }
    $desc = __('If you want to limit the number of characters or words that your user can input, set the number and type of limit you want to enforce below.', 'ninja-forms');
    ninja_forms_edit_field_el_output($field_id, 'desc', $desc);
    $desc = '<em>' . __('If you leave the box empty, no limit will be used', 'ninja-forms') . '</em>';
    ninja_forms_edit_field_el_output($field_id, 'desc', $desc);
    ninja_forms_edit_field_el_output($field_id, 'text', __('Limit input to this number', 'ninja-forms'), 'input_limit', $input_limit, 'thin', '', 'widefat', '');
    ninja_forms_edit_field_el_output($field_id, 'select', __('of', 'ninja-forms'), 'input_limit_type', $input_limit_type, 'thin', array(array('name' => __('Characters', 'ninja-forms'), 'value' => 'char'), array('name' => __('Words', 'ninja-forms'), 'value' => 'word')), 'widefat');
    ninja_forms_edit_field_el_output($field_id, 'text', __('Text to appear after character/word counter', 'ninja-forms'), 'input_limit_msg', $input_limit_msg, 'wide', '', 'widefat');
}
开发者ID:HeliWang,项目名称:EngSoc-Website,代码行数:38,代码来源:input-limit.php

示例6: nf_edit_field_req

function nf_edit_field_req($field_id, $field_data)
{
    global $ninja_forms_fields;
    $field_row = ninja_forms_get_field_by_id($field_id);
    $field_type = $field_row['type'];
    $reg_field = $ninja_forms_fields[$field_type];
    $field_req = $reg_field['req'];
    if ($field_req) {
        ninja_forms_edit_field_el_output($field_id, 'hidden', '', 'req', 1);
    }
}
开发者ID:ramiy,项目名称:ninja-forms,代码行数:11,代码来源:req.php

示例7: nf_field_autocomplete_off

function nf_field_autocomplete_off($field_id, $field_data)
{
    global $ninja_forms_fields;
    $field_row = ninja_forms_get_field_by_id($field_id);
    $field_type = $field_row['type'];
    $reg_field = $ninja_forms_fields[$field_type];
    $edit_autocomplete_off = $reg_field['edit_autocomplete_off'];
    if ($edit_autocomplete_off) {
        $autocomplete_off = isset($field_data['autocomplete_off']) ? $field_data['autocomplete_off'] : 0;
        ninja_forms_edit_field_el_output($field_id, 'checkbox', __('Disable Browser Autocomplete', 'ninja-forms'), 'autocomplete_off', $autocomplete_off, 'wide');
    }
}
开发者ID:se7ven214,项目名称:Kungfuphp.local,代码行数:12,代码来源:autocomplete-off.php

示例8: ninja_forms_edit_field_custom_class

function ninja_forms_edit_field_custom_class($field_id, $field_data)
{
    global $ninja_forms_fields;
    $field_row = ninja_forms_get_field_by_id($field_id);
    $field_type = $field_row['type'];
    $reg_field = $ninja_forms_fields[$field_type];
    $edit_custom_class = $reg_field['edit_custom_class'];
    if ($edit_custom_class) {
        if (isset($field_data['class'])) {
            $class = $field_data['class'];
        } else {
            $class = '';
        }
        ninja_forms_edit_field_el_output($field_id, 'text', __('Custom CSS Classes', 'ninja-forms'), 'class', $class, 'wide', '', 'widefat');
    }
}
开发者ID:ramiy,项目名称:ninja-forms,代码行数:16,代码来源:custom-class.php

示例9: ninja_forms_edit_field_calc

function ninja_forms_edit_field_calc($field_id)
{
    global $ninja_forms_fields;
    $field_row = ninja_forms_get_field_by_id($field_id);
    $field_type = $field_row['type'];
    if ($ninja_forms_fields[$field_type]['process_field']) {
        if (isset($field_row['data']['calc_option'])) {
            $calc_option = $field_row['data']['calc_option'];
        } else {
            $calc_option = 0;
        }
        if (isset($field_row['data']['calc_auto_include'])) {
            $calc_auto_include = $field_row['data']['calc_auto_include'];
        } else {
            $calc_auto_include = 0;
        }
        if (isset($field_row['data']['calc_value'])) {
            $calc_value = $field_row['data']['calc_value'];
        } else {
            $calc_value = 0;
        }
        ?>
		<div class="description description-wide">
		<hr>
		<h5><?php 
        _e('Calculation Settings', 'ninja-forms');
        ?>
</h5>
		<?php 
        if ($field_type == '_checkbox') {
            if (!isset($calc_value['unchecked'])) {
                $calc_value = array();
                $calc_value['unchecked'] = 0;
                $calc_value['checked'] = 0;
            }
            ninja_forms_edit_field_el_output($field_id, 'text', __('<strong>Checked</strong> Calculation Value', 'ninja-forms'), 'calc_value[checked]', $calc_value['checked'], 'wide', '', '', __('This is the value that will be used if <strong>Checked</strong>.', 'ninja-forms'));
            ninja_forms_edit_field_el_output($field_id, 'text', __('<strong>Unchecked</strong> Calculation Value', 'ninja-forms'), 'calc_value[unchecked]', $calc_value['unchecked'], 'wide', '', '', __('This is the value that will be used if <strong>Unchecked</strong>.', 'ninja-forms'));
        }
        //if ( $field_type != '_calc' ) {
        ninja_forms_edit_field_el_output($field_id, 'checkbox', __('Include in the auto-total? (If enabled)', 'ninja-forms'), 'calc_auto_include', $calc_auto_include, 'wide', '', 'ninja-forms-field-auto-total-include');
        //}
        //ninja_forms_edit_field_el_output($field_id, 'checkbox', __( 'Include in payment details list?', 'ninja-forms' ), 'calc_option', $calc_option, 'wide', '', '', __( ' - Should this field be considered as pertinant to a payment/product? i.e. an item option, a product size or color, etc.', 'ninja-forms' ) );
    }
    ?>
		
	<?php 
}
开发者ID:HeliWang,项目名称:EngSoc-Website,代码行数:47,代码来源:calc.php

示例10: ninja_forms_edit_field_placeholder

function ninja_forms_edit_field_placeholder($field_id)
{
    global $ninja_forms_fields;
    $field_row = ninja_forms_get_field_by_id($field_id);
    $field_type = $field_row['type'];
    $field_data = $field_row['data'];
    $reg_field = $ninja_forms_fields[$field_type];
    $edit_placeholder = $reg_field['edit_placeholder'];
    if ($edit_placeholder) {
        if (isset($field_data['placeholder'])) {
            $placeholder = stripslashes($field_data['placeholder']);
        } else {
            $placeholder = '';
        }
        ninja_forms_edit_field_el_output($field_id, 'text', __('Placeholder', 'ninja-forms'), 'placeholder', $placeholder, 'wide', '', 'widefat ninja-forms-field-label');
    }
}
开发者ID:ramiy,项目名称:ninja-forms,代码行数:17,代码来源:placeholder.php

示例11: ninja_forms_edit_field_help

function ninja_forms_edit_field_help($field_id)
{
    global $ninja_forms_fields;
    $field_row = ninja_forms_get_field_by_id($field_id);
    $field_type = $field_row['type'];
    $field_data = $field_row['data'];
    $reg_field = $ninja_forms_fields[$field_type];
    $edit_help = $reg_field['edit_help'];
    if ($edit_help) {
        if (isset($field_data['help_text'])) {
            $help_text = $field_data['help_text'];
        } else {
            $help_text = '';
        }
        if (isset($field_data['show_help'])) {
            $show_help = $field_data['show_help'];
        } else {
            $show_help = '';
        }
        if ($show_help == 1) {
            $display_span = '';
        } else {
            $display_span = 'display:none;';
        }
        $help_desc = sprintf(__('If "help text" is enabled, there will be a question mark %s placed next to the input field. Hovering over this question mark will show the help text.', 'ninja-forms'), '<img src="' . NINJA_FORMS_URL . 'images/question-ico.gif">');
        ninja_forms_edit_field_el_output($field_id, 'checkbox', __('Show Help Text', 'ninja-forms'), 'show_help', $show_help, 'wide', '', 'ninja-forms-show-help');
        ?>
		<span id="ninja_forms_field_<?php 
        echo $field_id;
        ?>
_help_span" style="<?php 
        echo $display_span;
        ?>
">
			<?php 
        ninja_forms_edit_field_el_output($field_id, 'textarea', __('Help Text', 'ninja-forms'), 'help_text', $help_text, 'wide', '', 'widefat');
        ninja_forms_edit_field_el_output($field_id, 'desc', $help_desc, 'help_desc');
        ?>
		</span>
		<?php 
    }
}
开发者ID:HeliWang,项目名称:EngSoc-Website,代码行数:42,代码来源:help.php

示例12: ninja_forms_field_required

function ninja_forms_field_required($field_id)
{
    global $ninja_forms_fields;
    $field_row = ninja_forms_get_field_by_id($field_id);
    $field_type = $field_row['type'];
    $field_data = $field_row['data'];
    $reg_field = $ninja_forms_fields[$field_type];
    $edit_req = $reg_field['edit_req'];
    $field_req = $reg_field['req'];
    if ($edit_req) {
        if (isset($field_data['req'])) {
            $req = $field_data['req'];
        } else {
            $req = '';
        }
        $options = array(array('name' => __('No', 'ninja-forms'), 'value' => '0'), array('name' => __('Yes', 'ninja-forms'), 'value' => '1'));
        ninja_forms_edit_field_el_output($field_id, 'select', __('Required', 'ninja-forms'), 'req', $req, 'thin', $options);
    }
    if ($field_req) {
        ninja_forms_edit_field_el_output($field_id, 'hidden', '', 'req', 1);
    }
}
开发者ID:HeliWang,项目名称:EngSoc-Website,代码行数:22,代码来源:req.php

示例13: ninja_forms_edit_field_label_pos

function ninja_forms_edit_field_label_pos($field_id, $field_data)
{
    global $ninja_forms_fields;
    $field_row = ninja_forms_get_field_by_id($field_id);
    $field_type = $field_row['type'];
    $reg_field = $ninja_forms_fields[$field_type];
    $edit_label_pos = $reg_field['edit_label_pos'];
    $label_pos_options = $reg_field['label_pos_options'];
    if (!$label_pos_options or $label_pos_options == '') {
        $options = array(array('name' => __('Left of Element', 'ninja-forms'), 'value' => 'left'), array('name' => __('Above Element', 'ninja-forms'), 'value' => 'above'), array('name' => __('Below Element', 'ninja-forms'), 'value' => 'below'), array('name' => __('Right of Element', 'ninja-forms'), 'value' => 'right'), array('name' => __('Inside Element', 'ninja-forms'), 'value' => 'inside'));
    } else {
        $options = $label_pos_options;
    }
    if ($edit_label_pos) {
        if (isset($field_data['label_pos'])) {
            $label_pos = $field_data['label_pos'];
        } else {
            $label_pos = 'above';
        }
        ninja_forms_edit_field_el_output($field_id, 'select', __('Label Position', 'ninja-forms'), 'label_pos', $label_pos, 'wide', $options, 'widefat');
    }
}
开发者ID:se7ven214,项目名称:Kungfuphp.local,代码行数:22,代码来源:label.php

示例14: ninja_forms_user_info_fields_groups

function ninja_forms_user_info_fields_groups($field_id)
{
    $field = ninja_forms_get_field_by_id($field_id);
    if (isset($field['data']['user_info_field_group']) and $field['data']['user_info_field_group'] == 1) {
        $options = array(array('name' => '- ' . __('None', 'ninja-forms'), 'value' => ''), array('name' => __('Billing', 'ninja-forms'), 'value' => 'billing'), array('name' => __('Shipping', 'ninja-forms'), 'value' => 'shipping'), array('name' => __('Custom', 'ninja-forms') . ' ->', 'value' => 'custom'));
        if (isset($field['data']['user_info_field_group_name'])) {
            $group_name = $field['data']['user_info_field_group_name'];
        } else {
            $group_name = '';
        }
        if (isset($field['data']['user_info_field_group_custom'])) {
            $group_custom = $field['data']['user_info_field_group_custom'];
        } else {
            $group_custom = '';
        }
        if ($group_name == 'custom') {
            $custom_class = '';
        } else {
            $custom_class = 'hidden';
        }
        ninja_forms_edit_field_el_output($field_id, 'select', __('User Info Field Group', 'ninja-forms'), 'user_info_field_group_name', $group_name, 'thin', $options, 'user-info-group-name widefat');
        ninja_forms_edit_field_el_output($field_id, 'text', __('Custom Field Group', 'ninja-forms'), 'user_info_field_group_custom', $group_custom, 'thin', '', 'user-info-custom-group widefat ' . $custom_class, '', $custom_class);
    }
}
开发者ID:hoonio,项目名称:PhoneAfrika,代码行数:24,代码来源:user-info-fields.php

示例15: nf_output_registered_field_settings


//.........这里部分代码省略.........
            } else {
                $name = '';
            }
            if (isset($opt['width'])) {
                $width = $opt['width'];
            } else {
                $width = '';
            }
            if (isset($opt['options'])) {
                $options = $opt['options'];
            } else {
                $options = '';
            }
            if (isset($opt['class'])) {
                $class = $opt['class'];
            } else {
                $class = '';
            }
            if (isset($opt['default'])) {
                $default = $opt['default'];
            } else {
                $default = '';
            }
            if (isset($opt['desc'])) {
                $desc = $opt['desc'];
            } else {
                $desc = '';
            }
            if (isset($field_data[$name])) {
                $value = $field_data[$name];
            } else {
                $value = $default;
            }
            ninja_forms_edit_field_el_output($field_id, $type, $label, $name, $value, $width, $options, $class, $desc, $label_class);
        }
    }
    add_action('nf_edit_field_advanced', 'nf_test', 10, 2);
    $settings_sections = apply_filters('nf_edit_field_settings_sections', array('restrictions' => __('Restriction Settings', 'ninja-forms'), 'calculations' => __('Calculation Settings', 'ninja-forms'), 'advanced' => __('Advanced Settings', 'ninja-forms')));
    foreach ($settings_sections as $key => $name) {
        ?>
		<div class="nf-field-settings description-wide description">
			<div class="title">
				<?php 
        echo $name;
        ?>
<span class="dashicons dashicons-arrow-down nf-field-sub-section-toggle"></span>
			</div>
			<div class="inside" style="display:none;">
				<?php 
        if (!empty($edit_settings[$key])) {
            foreach ($edit_settings[$key] as $opt) {
                $type = $opt['type'];
                $label_class = '';
                if (isset($opt['label'])) {
                    $label = $opt['label'];
                } else {
                    $label = '';
                }
                if (isset($opt['name'])) {
                    $name = $opt['name'];
                } else {
                    $name = '';
                }
                if (isset($opt['width'])) {
                    $width = $opt['width'];
                } else {
开发者ID:ramiy,项目名称:ninja-forms,代码行数:67,代码来源:li.php


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