本文整理汇总了PHP中UI::radio方法的典型用法代码示例。如果您正苦于以下问题:PHP UI::radio方法的具体用法?PHP UI::radio怎么用?PHP UI::radio使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UI
的用法示例。
在下文中一共展示了UI::radio方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strtotime
$lastname_column = $ui->col()
->width(3)
->open();
*/
$ui->input()->placeholder('Last Name')->width(3)->id('lastname')->name('lastname')->value($user_details->last_name)->show();
// $lastname_column->close();
$student_name->close();
$student_personal_details_row_1 = $ui->row()->open();
/*$column3 = $ui->col()
->width(3)
->open();*/
$ui->input()->label('पूरा नाम हिन्दी में')->id('stud_name_hindi')->name('stud_name_hindi')->value($stu_basic_details->name_in_hindi)->width(3)->show();
// $column3->close();
$column_gender = $ui->col()->width(3)->open();
echo '<label>Gender</label>';
$ui->radio()->name('sex')->label('Male')->value('m')->checked($user_details->sex == "m")->show();
$ui->radio()->name('sex')->label('Female')->value('f')->checked($user_details->sex == "f")->show();
$ui->radio()->name('sex')->label('Others')->value('o')->checked($user_details->sex == "o")->show();
$column_gender->close();
/*$column5 = $ui->col()
->width(3)
->open();*/
$ui->datePicker()->label('Date of Birth')->width(3)->name('dob')->value(date('d-m-Y', strtotime($user_details->dob)))->dateFormat('dd-mm-yyyy')->show();
/*$column5->close();
$column6 = $ui->col()
->width(3)
->open();
$column6->close();*/
$ui->input()->label('Place of Birth')->name('pob')->required()->value($user_other_details->birth_place)->width(3)->show();
示例2: array
?>
<h2 class="page-header">Form Elements</h2><?php
$formRow = $ui->row()->open();
$col = $ui->col()->width(8)->open();
$box = $ui->box()->title("General Elements")->open();
$ui->callout()->uiType("info")->desc("See wiki for a detailed explanation of creating each type of element.")->show();
$ui->input()->type("text")->label("Text")->placeholder("Text")->show();
$ui->input()->type("text")->label("A textbox with help")->placeholder("Text")->help("Some help text goes here")->show();
$ui->input()->type("text")->label("Text Disabled")->placeholder("Text Disabled")->disabled()->show();
$ui->textarea()->label("Textarea")->placeholder("Textarea")->show();
$ui->input()->type("text")->label("Input with success")->placeholder("Enter text")->uiType("success")->show();
$ui->input()->type("text")->label("Input with warning")->placeholder("Enter text")->uiType("warning")->show();
$ui->input()->type("text")->label("Input with error")->placeholder("Enter text")->uiType("error")->show();
$ui->checkbox()->label("Checkbox")->show();
$ui->checkbox()->label("Disabled Checkbox")->disabled()->show();
$ui->radio()->label("Radio button")->name("sampleRadio")->checked()->show();
$ui->radio()->label("Another Radio Button")->name("sampleRadio")->show();
$ui->select()->label('Select Box')->name('select_box')->options(array($ui->option()->value('0')->text('Select')->disabled(), $ui->option()->value('1')->text('One'), $ui->option()->value('2')->text('Two'), $ui->option()->value('3')->text('Three'), $ui->option()->value('4')->text('Four')->selected(), $ui->option()->value('5')->text('Five')))->show();
$sampleOptions = array($ui->option()->value('0')->text('Select')->disabled(), $ui->option()->value('1')->text('One'), $ui->option()->value('2')->text('Two'), $ui->option()->value('3')->text('Three'), $ui->option()->value('4')->text('Four')->selected(), $ui->option()->value('5')->text('Five'));
$ui->select()->label('Multiple Select Box')->name('multiple_select_box')->multiple()->options($sampleOptions)->show();
$ui->imagePicker()->label("An image picker")->show();
$ui->datePicker()->label("A date picker")->show();
$ui->timePicker()->label("A time picker")->show();
$ui->slider()->id('slider2')->min('0')->label('A slider')->max('100')->step('1')->grid()->value("15")->show();
$ui->slider()->id('slider1')->label('A ranged slider')->min('0')->max('50000')->step('100')->rangeType()->dataFrom('9000')->dataTo('20000')->prefix('$')->show();
?>
<p>To create input elements with smaller widths, create a <code>Row</code> and place the inputs inside it with their <code>width()</code> property:</p>
<pre>
$inputsRow = $ui->row()->open();
$ui->input()->type("text")->...->width(2)->show();
$ui->select()->...->width(4)->show();
示例3: date
echo 'Fields marked with <span style= "color:red;">*</span> are mandatory.<br><br> ';
$row3 = $ui->row()->open();
$ui->select()->width(2)->name('salutation')->label('Salutation<span style= "color:red;"> *</span>')->options(array($ui->option()->value('Dr')->text('Dr'), $ui->option()->value('Prof')->text('Prof'), $ui->option()->value('Mr')->text('Mr'), $ui->option()->value('Mrs')->text('Mrs'), $ui->option()->value('Ms')->text('Ms')))->show();
$ui->input()->width(3)->name('firstname')->required()->placeholder("First Name")->label('First Name<span style= "color:red;"> *</span>')->show();
$ui->input()->width(3)->name('middlename')->label('Middle Name')->placeholder("Middle Name")->show();
$ui->input()->width(3)->name('lastname')->placeholder("Last Name")->label('Last Name')->show();
$row3->close();
$row4 = $ui->row()->open();
$ui->select()->width(3)->name('mstatus')->label('Marital Status<span style= "color:red;"> *</span>')->options(array($ui->option()->value('married')->text('Married'), $ui->option()->value('unmarried')->text('Unmarried'), $ui->option()->value('widow')->text('Widow'), $ui->option()->value('widower')->text('Widower'), $ui->option()->value('separated')->text('Separated'), $ui->option()->value('divorced')->text('Divorced')))->show();
$ui->datePicker()->label('DOB<span style= "color:red;"> *</span>')->id('dob')->name('dob')->required()->dateFormat('dd-mm-yyyy')->width(3)->addonRight($ui->icon("calendar"))->value(date("d-m-Y"))->extras('max="' . date("d-m-Y") . '"')->show();
$ui->input()->width(3)->name('pob')->required()->label('Place of Birth<span style= "color:red;"> *</span>')->show();
$row4->close();
$row2 = $ui->row()->open();
$col1 = $ui->col()->width(3)->open();
echo '<label>Gender<span style= "color:red;"> *</span></label>';
$ui->radio()->name('sex')->value('m')->label('Male')->checked()->show();
$ui->radio()->name('sex')->value('f')->label('Female')->show();
$ui->radio()->name('sex')->value('o')->label('Others')->show();
$col1->close();
$col2 = $ui->col()->width(3)->open();
echo '<label>Physically Challenged<span style= "color:red;"> *</span></label>';
$ui->radio()->name('pd')->value('yes')->label('Yes')->show();
$ui->radio()->name('pd')->value('no')->label('No')->checked()->show();
$col2->close();
$col3 = $ui->col()->width(3)->open();
echo '<label>Kashmiri Immigrant<span style= "color:red;"> *</span></label>';
$ui->radio()->name('kashmiri')->value('yes')->label('Yes')->show();
$ui->radio()->name('kashmiri')->value('no')->label('No')->checked()->show();
$col3->close();
$row2->close();
$row5 = $ui->row()->open();
示例4:
$ui->input()->type('text')->name('client6')->value($value)->width(12)->show();
?>
</td>
</tr>
<?php
$table->close();
$inputRow2->close();
$innerRow1->close();
$tab3->close();
$tabBox1->close();
$inputRow1 = $ui->row()->open();
$column1 = $ui->col()->width(4)->open();
?>
<h4>Correspondence with client :</h4><?php
$column1->close();
$column2 = $ui->col()->width(4)->open();
$ui->radio()->label("Yes")->name("correspondence")->value('1')->checked()->show();
$column2->close();
$column3 = $ui->col()->width(4)->open();
$ui->radio()->label("No")->name("correspondence")->value('0')->show();
$column3->close();
$inputRow1->close();
$OAT_box->close();
?>
<center>
<?php
$ui->button()->value('submit')->uiType('primary')->submit()->name('mysubmit')->show();
$form->close();
$box->close();
$column2->close();
$row->close();
示例5: UI
$ui = new UI();
for ($i = 1; $i <= $total_authors; $i++) {
$row = $ui->row()->open();
$table = $ui->table()->hover()->bordered()->open();
?>
<tr><td><?php
$col = $ui->col()->width(4)->open();
?>
Author <?php
echo $i;
?>
</td><td>
<?php
$col->close();
$col1 = $ui->col()->width(4)->open();
$ui->radio()->name('author_' . $i . '_type')->label('ISM')->id($i)->style('width: 15px; height: 15px;')->extras(' onclick="add_template(this.value,this.id)" ')->value('ISM')->show();
$col1->close();
?>
</td><td>
<?php
$col2 = $ui->col()->width(4)->open();
$ui->radio()->name('author_' . $i . '_type')->value('OTHER')->label('OTHER')->style('width: 15px; height: 15px;')->id($i)->extras(' onclick="add_template(this.value,this.id)" ')->show();
$col2->close();
?>
</td></tr><?php
$table->close();
$row->close();
$row2 = $ui->col()->id('other_author' . $i)->open();
$row2->close();
}