当前位置: 首页>>代码示例>>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;未经允许,请勿转载。