當前位置: 首頁>>代碼示例>>PHP>>正文


PHP HtmlForm::addRadioButton方法代碼示例

本文整理匯總了PHP中HtmlForm::addRadioButton方法的典型用法代碼示例。如果您正苦於以下問題:PHP HtmlForm::addRadioButton方法的具體用法?PHP HtmlForm::addRadioButton怎麽用?PHP HtmlForm::addRadioButton使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在HtmlForm的用法示例。


在下文中一共展示了HtmlForm::addRadioButton方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

         if ($getNewItem == 0) {
             $defaultValue = $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_id');
         }
         $form->addSelectBoxFromSql('inf-' . $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_id'), $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_name'), $gDb, $sql, array('property' => $fieldProperty, 'showContextDependentFirstEntry' => true, 'defaultValue' => $defaultValue));
     } else {
         $arrListValues = $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_value_list');
         $defaultValue = $inventory->getValue($field->getValue('inf_name_intern'), 'database');
         $form->addSelectBox('inf-' . $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_id'), $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_name'), $arrListValues, $fieldProperty, $defaultValue, true, $helpId, null, $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_icon', 'database'));
     }
 } elseif ($gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_type') === 'RADIO_BUTTON') {
     $arrListValues = $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_value_list');
     $showDummyRadioButton = false;
     if ($gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_mandatory') == 0) {
         $showDummyRadioButton = true;
     }
     $form->addRadioButton('inf-' . $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_id'), $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_name'), $arrListValues, $fieldProperty, $inventory->getValue($field->getValue('inf_name_intern'), 'database'), $showDummyRadioButton, $helpId, $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_icon', 'database'));
 } elseif ($gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_type') === 'TEXT_BIG') {
     $form->addMultilineTextInput('inf-' . $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_id'), $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_name'), $inventory->getValue($field->getValue('inf_name_intern')), 3, 4000, $fieldProperty, $helpId, $gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_icon', 'database'));
 } else {
     $fieldType = 'text';
     if ($gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_type') === 'DATE') {
         $fieldType = 'date';
         $maxlength = '10';
     } elseif ($gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_type') === 'EMAIL') {
         // email could not be longer than 254 characters
         $fieldType = 'email';
         $maxlength = '254';
     } elseif ($gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_type') === 'URL') {
         // maximal browser compatible url length will be 2000 characters
         $maxlength = '2000';
     } elseif ($gInventoryFields->getProperty($field->getValue('inf_name_intern'), 'inf_type') === 'NUMBER') {
開發者ID:sistlind,項目名稱:admidio,代碼行數:31,代碼來源:item_new.php

示例2: elseif

             $defaultValue = $gPreferences['default_country'];
         } elseif ($user->getValue('usr_id') > 0 && strlen($user->getValue($field->getValue('usf_name_intern'))) > 0) {
             $defaultValue = $user->getValue($field->getValue('usf_name_intern'), 'database');
         }
     } else {
         $arrListValues = $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_value_list');
         $defaultValue = $user->getValue($field->getValue('usf_name_intern'), 'database');
     }
     $form->addSelectBox('usf-' . $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_id'), $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_name'), $arrListValues, array('property' => $fieldProperty, 'defaultValue' => $defaultValue, 'helpTextIdLabel' => $helpId, 'icon' => $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_icon', 'database')));
 } elseif ($gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_type') === 'RADIO_BUTTON') {
     $arrListValues = $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_value_list');
     $showDummyRadioButton = false;
     if ($gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_mandatory') == 0) {
         $showDummyRadioButton = true;
     }
     $form->addRadioButton('usf-' . $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_id'), $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_name'), $arrListValues, array('property' => $fieldProperty, 'defaultValue' => $user->getValue($field->getValue('usf_name_intern'), 'database'), 'showNoValueButton' => $showDummyRadioButton, 'helpTextIdLabel' => $helpId, 'icon' => $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_icon', 'database')));
 } elseif ($gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_type') === 'TEXT_BIG') {
     $form->addMultilineTextInput('usf-' . $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_id'), $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_name'), $user->getValue($field->getValue('usf_name_intern')), 3, array('maxLength' => 4000, 'property' => $fieldProperty, 'helpTextIdLabel' => $helpId, 'icon' => $gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_icon', 'database')));
 } else {
     $fieldType = 'text';
     if ($gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_type') === 'DATE') {
         if ($field->getValue('usf_name_intern') === 'BIRTHDAY') {
             $fieldType = 'birthday';
         } else {
             $fieldType = 'date';
         }
         $maxlength = '10';
     } elseif ($gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_type') === 'EMAIL') {
         // email could not be longer than 254 characters
         $fieldType = 'email';
         $maxlength = '254';
開發者ID:martinbrylski,項目名稱:admidio,代碼行數:31,代碼來源:profile_new.php


注:本文中的HtmlForm::addRadioButton方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。