本文整理汇总了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') {
示例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';