Ejemplo n.º 1
0
    'type' => 'checkbox',
    'name' => 'checkbox',
    'options' => [
        'check_1' => 'Option 1',
        'check_2' => 'Option 2',
        'check_3' => 'Option 3',
        'check_4' => 'Option 4',
        'check_5' => 'Option 5'
    ]
]);
</pre>
</code>	

		<h3>Select with all the options</h3>
<?php 
echo SAMUIKit\FormControls::select(['label' => 'Checkbox', 'type' => 'checkbox', 'name' => 'checkbox', 'options' => ['check_1' => 'Option 1', 'check_2' => 'Option 2', 'check_3' => 'Option 3', 'check_4' => 'Option 4', 'check_5' => 'Option 5'], 'required' => true, 'hint' => 'The hint for the form control.', 'errorMessage' => 'This form control has errors', 'selected' => ['check_1', 'check_3', 'check_4']]);
?>
<code>
<pre>
echo SAMUIKit\FormControls::select([
    'label' => 'Checkbox',
    'type' => 'checkbox',
    'name' => 'checkbox',
    'options' => [
        'check_1' => 'Option 1',
        'check_2' => 'Option 2',
        'check_3' => 'Option 3',
        'check_4' => 'Option 4',
        'check_5' => 'Option 5'
    ],
    'required' => true,
Ejemplo n.º 2
0
<p style="clear: both; padding-top: 40px;"><i>Checkbox</i></p>
<div class="usa-with-one-whole" style="clear: both; padding-top: 20px;">
	<div class="usa-width-one-third">
	<?php 
echo SAMUIKit\FormControls::select(['label' => 'Checkbox label', 'type' => 'checkbox', 'name' => 'checkbox_1', 'hint' => 'Inline help text.', 'options' => ['c1opt1' => 'Option 1', 'c1opt2' => 'Option 2', 'c1opt3' => 'Option 3', 'c1opt4' => 'Option 4', 'c1opt5' => 'Option 5']]);
?>
	</div>
	<div class="usa-width-one-third">
	<?php 
echo SAMUIKit\FormControls::select(['label' => 'Checkbox pre-selected', 'type' => 'checkbox', 'name' => 'checkbox_2', 'hint' => 'Inline help text.', 'options' => ['c2opt1' => 'Option 1', 'c2opt2' => 'Option 2', 'c2opt3' => 'Option 3', 'c2opt4' => 'Option 4', 'c2opt5' => 'Option 5'], 'selected' => ['c2opt3', 'c2opt5']]);
?>
	</div>
	<div class="usa-width-one-third">
	<?php 
echo SAMUIKit\FormControls::select(['label' => 'Checkbox pre-selected w/ error', 'type' => 'checkbox', 'name' => 'checkbox_3', 'hint' => 'Inline help text.', 'errorMessage' => 'There was an error.', 'options' => ['c3opt1' => 'Option 1', 'c3opt2' => 'Option 2', 'c3opt3' => 'Option 3', 'c3opt4' => 'Option 4', 'c3opt5' => 'Option 5'], 'selected' => ['c3opt3', 'c3opt5']]);
?>
	</div>	
</div>

<p style="clear: both; padding-top: 40px;"><i>Checkbox</i></p>
<div class="usa-with-one-whole" style="clear: both; padding-top: 20px;">
	<div class="usa-width-one-third">
	<?php 
echo SAMUIKit\FormControls::dateInput(['label' => 'Date fieldset legend', 'name' => 'date_1', 'hint' => 'Inline help text.']);
?>
	</div>
	<div class="usa-width-one-third">
	<?php 
echo SAMUIKit\FormControls::dateInput(['label' => 'Date fieldset legend - pref-filled', 'name' => 'date_2', 'hint' => 'Inline help text.', 'month' => 1, 'day' => 1, 'year' => 2015]);
?>