本文整理汇总了PHP中Forms::selectLive方法的典型用法代码示例。如果您正苦于以下问题:PHP Forms::selectLive方法的具体用法?PHP Forms::selectLive怎么用?PHP Forms::selectLive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Forms
的用法示例。
在下文中一共展示了Forms::selectLive方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
echo '<div class="col-md-6">';
$form->input('value', null, 'currency', isset($_POST['value']) ? $_POST['value'] : '', null, null, isset($fieldErrors['value']));
echo '</div>';
echo '</div>';
$form->input('email');
$form->input('telephone');
echo '</div>';
echo '<div class="col-md-4">';
$form->input('company');
$form->input('street *', 'street', 'text', isset($_POST['street']) ? $_POST['street'] : '', null, null, isset($fieldErrors['street']));
$form->input('city *', 'city', 'text', isset($_POST['city']) ? $_POST['city'] : '', null, null, isset($fieldErrors['city']));
$form->input('region *', 'region', 'text', isset($_POST['region']) ? $_POST['region'] : '', null, null, isset($fieldErrors['region']));
$form->input('postcode *', 'postcode', 'text', isset($_POST['postcode']) ? $_POST['postcode'] : '', null, null, isset($fieldErrors['postcode']));
echo '</div>';
echo '<div class="col-md-4">';
$form->selectLive('country *', 'country_id');
foreach ($api->ISOCodes as $key => $ISOCode) {
$form->select('option', $ISOCode, $key, isset($_POST['country_id']) ? $key == $_POST['country_id'] : 'GB');
}
$form->select('end', 'country');
$form->select('start', 'Format *', 'postType');
foreach ($postTypes as $key => $postType) {
$form->select('option', $postType, $key, isset($_POST['postType']) ? $key == $_POST['postType'] : null);
}
$form->select('end', 'Format');
$form->select('start', 'Services *', 'shipping_description');
foreach ($services as $key => $service) {
$form->select('option', $service, $key, isset($_POST['shipping_description']) ? $key == $_POST['shipping_description'] : '2nd');
}
$form->select('end', 'Services');
echo '</div>';
示例2: collection
public function collection()
{
global $db;
$results = $db->select("settings", null, "barcodes", 1);
$settings['site']['barcodes'] = $results['barcodes'];
$results = $db->select("collections", null, "id,name,barcodes", null, "name");
$form = new Forms();
$form->start("import.php?step=3", false, "step-3");
echo "<div class='row'>";
echo "<div class='col-xs-12 col-sm-10'>";
$form->selectLive("collections");
foreach ($results as $key => $collection) {
$bc = null;
if ($collection['barcodes'] and $settings['site']['barcodes']) {
$bc = " (Expects Barcodes)";
}
$form->select("option", $collection['name'] . $bc, $collection['id']);
}
$form->select("end");
echo "</div>";
echo "<div class='col-xs-12 col-sm-2'>";
$form->input("barcode overide", "bco", "toggle", 0);
echo "</div>";
echo "</div>";
$form->end();
}