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


PHP EEH_Form_Fields::hidden_input方法代码示例

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


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

示例1: _get_table_filters

 /**
  * 	_get_table_filters
  * @access protected
  * @return array
  */
 protected function _get_table_filters()
 {
     $filters = array();
     //todo we're currently using old functions here. We need to move things into the Events_Admin_Page() class as methods.
     EE_Registry::instance()->load_helper('Form_Fields');
     $cur_date = isset($this->_req_data['month_range']) ? $this->_req_data['month_range'] : '';
     $cur_category = isset($this->_req_data['EVT_CAT']) ? $this->_req_data['EVT_CAT'] : -1;
     $reg_status = isset($this->_req_data['_reg_status']) ? $this->_req_data['_reg_status'] : '';
     $filters[] = EEH_Form_Fields::generate_registration_months_dropdown($cur_date, $reg_status, $cur_category);
     $filters[] = EEH_Form_Fields::generate_event_category_dropdown($cur_category);
     $status = array();
     $status[] = array('id' => 0, 'text' => __('Select Status', 'event_espresso'));
     foreach ($this->_status as $key => $value) {
         $status[] = array('id' => $key, 'text' => $value);
     }
     if ($this->_view != 'incomplete') {
         $filters[] = EEH_Form_Fields::select_input('_reg_status', $status, isset($this->_req_data['_reg_status']) ? strtoupper(sanitize_key($this->_req_data['_reg_status'])) : '');
     }
     if (isset($this->_req_data['event_id'])) {
         $filters[] = EEH_Form_Fields::hidden_input('event_id', $this->_req_data['event_id'], 'reg_event_id');
     }
     return $filters;
 }
开发者ID:robert-osborne,项目名称:event-espresso-core-1,代码行数:28,代码来源:EE_Registrations_List_Table.class.php

示例2: display_add_new_state_micro_form

 /**
  * 	display_add_new_state_micro_form
  *
  * 	@access 	public
  * 	@return 		string
  */
 public static function display_add_new_state_micro_form($input_html, $question, $answer, $name, $id, $class, $system_ID)
 {
     // load JS
     add_action('wp_enqueue_scripts', array('EED_Add_New_State', 'wp_enqueue_scripts'), 10);
     $output = '';
     // we're only doing this for state select inputs
     if ($system_ID == 'state') {
         // add hidden input to indicate that a new state is being added
         $output .= EEH_Form_Fields::hidden_input(str_replace('state', 'add_new_state', $name), 0, str_replace('state', 'add_new_state', $id));
         $output .= '<a id="display-' . $id . '" class="ee-form-add-new-state-lnk display-the-hidden smaller-text hide-if-no-js" rel="' . $id . '">' . __('click here to add a new state/province', 'event_espresso') . '</a>';
         $output .= '<div id="' . $id . '-dv" class="ee-form-add-new-state-dv" style="display: none;">';
         $output .= '<h6>' . __('If your State/Province does not appear in the list above, you can easily add it by doing the following:', 'event_espresso') . '</h6>';
         $output .= '<ul>';
         $output .= sprintf(__('%1$sfirst select the Country that your State/Province belongs to%2$s%1$senter the name of your State/Province%2$s%1$senter a two to six letter abbreviation for the name of your State/Province%2$s%1$sclick the ADD button%2$s', 'event_espresso'), '<li>', '</li>');
         $output .= '</ul>';
         // NEW STATE COUNTRY
         $cntry_id = str_replace('state', 'new_state_country', $id);
         $cntry_input = str_replace('state', 'new_state_country', $name);
         $country = new EE_Question_Form_Input(EE_Question::new_instance(array('QST_display_text' => __('New State/Province Country', 'event_espresso'), 'QST_system' => 'admin-country', 'QST_type' => EEM_Question::QST_type_dropdown, 'QST_required' => FALSE)), EE_Answer::new_instance(array('ANS_value' => EE_Registry::instance()->REQ->is_set($cntry_input) ? EE_Registry::instance()->REQ->get($cntry_input) : '')), array('input_name' => $cntry_input, 'input_id' => $cntry_id, 'input_class' => $class, 'input_prefix' => '', 'append_qstn_id' => FALSE));
         $output .= EEH_Form_Fields::generate_form_input($country);
         // NEW STATE NAME
         $state_id = str_replace('state', 'new_state_name', $id);
         $state_name = str_replace('state', 'new_state_name', $name);
         $new_state_name = new EE_Question_Form_Input(EE_Question::new_instance(array('QST_display_text' => __('New State/Province Name', 'event_espresso'), 'QST_system' => '', 'QST_type' => EEM_Question::QST_type_text, 'QST_required' => FALSE)), EE_Answer::new_instance(array('ANS_value' => EE_Registry::instance()->REQ->is_set($state_name) ? EE_Registry::instance()->REQ->get($state_name) : '')), array('input_name' => $state_name, 'input_id' => $state_id, 'input_class' => $class, 'input_prefix' => '', 'append_qstn_id' => FALSE));
         $output .= EEH_Form_Fields::generate_form_input($new_state_name);
         // NEW STATE ABBREVIATION
         $abbrv_id = str_replace('state', 'new_state_abbrv', $id);
         $abbrv_name = str_replace('state', 'new_state_abbrv', $name);
         $new_state_abbrv = new EE_Question_Form_Input(EE_Question::new_instance(array('QST_display_text' => __('New State/Province Abbreviation', 'event_espresso'), 'QST_system' => '', 'QST_type' => EEM_Question::QST_type_text, 'QST_required' => FALSE)), EE_Answer::new_instance(array('ANS_value' => EE_Registry::instance()->REQ->is_set($abbrv_name) ? EE_Registry::instance()->REQ->get($abbrv_name) : '')), array('input_name' => $abbrv_name, 'input_id' => $abbrv_id, 'input_class' => $class, 'input_prefix' => '', 'append_qstn_id' => FALSE));
         // add filters for reducing size of State Abbrv text input, and adding an "ADD" button, as well as a "cancel" button
         add_filter('FHEE__EEH_Form_Fields__additional_form_field_attributes', array('EED_Add_New_State', 'set_new_state_input_size'));
         add_filter('FHEE__EEH_Form_Fields__input_html', array('EED_Add_New_State', 'add_new_state_submit_button'), 1, 3);
         add_filter('FHEE__EEH_Form_Fields__input_html', array('EED_Add_New_State', 'cancel_new_state'), 2, 3);
         $output .= EEH_Form_Fields::generate_form_input($new_state_abbrv);
         // remove the filters from above so that they don't affect any other inputs
         remove_filter('FHEE__EEH_Form_Fields__additional_form_field_attributes', array('EED_Add_New_State', 'set_new_state_input_size'));
         remove_filter('FHEE__EEH_Form_Fields__input_html', array('EED_Add_New_State', 'add_new_state_submit_button'), 1, 3);
         remove_filter('FHEE__EEH_Form_Fields__input_html', array('EED_Add_New_State', 'cancel_new_state'), 2, 3);
         $output .= '</div>';
     }
     return $input_html . $output;
 }
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:48,代码来源:EED_Add_New_State.module.php

示例3:

								</td>
								<td class="option-desc-cell">
									<input type="text" name="question_options[0][QSO_desc]" class="option-desc regular-text">
								</td>
								<td>
									<?php 
    echo EEH_Form_Fields::hidden_input("question_options_count", $count);
    ?>
								</td>
							</tr>
							<?php 
}
?>
							<tr style="display:none">
								<td colspan="3"><?php 
echo EEH_Form_Fields::hidden_input("question_options_count", $count);
?>
</td>
							</tr>
						</tbody>
					</table>

					<a id="new-question-option" class="button" style="margin:0 0 1em 3px;">
						<?php 
_e('Add Another Answer Option', 'event_espresso');
?>
					</a><br/>

					<p class="description">
						<?php 
_e('Answer Options are the choices that you give people to select from for RADIO_BTN, CHECKBOX or DROPDOWN questions. The Value is a simple key that will be saved to the database and the description is optional. Note that values CANNOT contain any HTML, but descriptions can.', 'event_espresso');
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:31,代码来源:questions_main_meta_box.template.php


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