Esempio n. 1
0
<code>
<pre>
echo SAMUIKit\FormControls::textInput([
    'label' => 'Text input with all variables',
    'type' => 'text',
    'name' => 'basic',
    'errorMessage' => 'This text input was submitted with errors.',
    'hint' => 'This text input has a hint.',
    'value' => 'Hello world!'
]);
</pre>
</code>

<?php 
echo SAMUIKit\FormControls::textInput(['label' => 'Text area', 'type' => 'textarea', 'name' => 'textarea', 'hint' => 'This text area has a hint.', 'value' => 'Hello world!']);
?>
 

<code>
<pre>
echo SAMUIKit\FormControls::textInput([
    'label' => 'Text area',
    'type' => 'textarea',
    'name' => 'textarea',
    'hint' => 'This text area has a hint.',
    'value' => 'Hello world!'
]);
</pre>
</code>
Esempio n. 2
0
	<?php 
echo SAMUIKit\FormControls::textInput(['label' => 'Text input label', 'type' => 'text', 'name' => 'text-input-label-with-error', 'errorMessage' => 'There was an error.', 'hint' => 'Inline help text.']);
?>
	</div>	
</div>

<p>Text areas</p>
<div class="usa-with-one-whole" style="clear: both; padding-top: 20px;">
	<div class="usa-width-one-half">
	<?php 
echo SAMUIKit\FormControls::textInput(['label' => 'Text are label', 'type' => 'textarea', 'name' => 'text-area-label', 'hint' => 'Inline help text.']);
?>
	</div>
	<div class="usa-width-one-half">
	<?php 
echo SAMUIKit\FormControls::textInput(['label' => 'Text are label', 'type' => 'textarea', 'name' => 'text-area-label', 'errorMessage' => 'There was an error.', 'hint' => 'Inline help text.']);
?>
	
	</div>	
</div>

<p>Select</p>
<p><i>Dropdown</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' => 'Dropdown label', 'type' => 'dropdown', 'name' => 'dropdown', 'hint' => 'Inline help text.', 'options' => ['opt1' => 'Option 1', 'opt2' => 'Option 2', 'opt3' => 'Option 3', 'opt4' => 'Option 4', 'opt5' => 'Option 5']]);
?>
	</div>
	<div class="usa-width-one-third">
	<?php