當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。