Exemplo n.º 1
0
	<h2>Date Inputs</h2>
<?php 
echo SAMUIKit\FormControls::dateInput(['label' => 'Basic date input', 'name' => 'basic']);
?>

<code>
<pre>
echo SAMUIKit\FormControls::dateInput([
    'label' => 'Basic date input',
    'name' => 'basic'
]);
</pre>
</code>

<?php 
echo SAMUIKit\FormControls::dateInput(['label' => 'Date input w/ all variables', 'name' => 'basic', 'errorMessage' => 'This date is required.', 'hint' => 'This is a date hint.', 'required' => true, 'month' => 1, 'day' => 1, 'year' => 2000]);
?>

<code>
<pre>
echo SAMUIKit\FormControls::dateInput([
    'label' => 'Date input w/ all variables',
    'name' => 'basic',
    'errorMessage' => 'This date is required.',
    'hint' => 'This is a date hint.',
    'required' => true,
    'month' => 1,
    'day' => 1,
    'year' => 2000
]);
</pre>
Exemplo 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::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]);
?>
	</div>
	<div class="usa-width-one-third">
	<?php 
echo SAMUIKit\FormControls::dateInput(['label' => 'Date fieldset legend - pref-filled', 'name' => 'date_3', 'hint' => 'Inline help text.', 'month' => 1, 'day' => 1, 'year' => 2015, 'errorMessage' => 'There was an error.']);
?>
	</div>	
</div>

<p style="clear: both; padding-top: 20px;"><strong>Form Templates</strong></p>
<p style="clear: both; padding-top: 40px;"><i>Sign in form</i></p>
<div class="usa-with-one-whole" style="clear: both; padding-top: 20px;">
	<div class="usa-width-one-half">
	<?php 
echo SAMUIKit\FormTemplates::signInForm(['textInputs' => [['label' => 'Email address', 'type' => 'email', 'name' => 'email', 'hint' => 'Your registered email address.'], ['label' => 'Password', 'type' => 'password', 'name' => 'password']], 'createPath' => '/path/to/register', 'forgotLinks' => ['/path/to/reset/password' => 'Forgot password'], 'showPasswordOnClick' => 'ShowPasswordEventHandler']);
?>
	</div>
	<div class="usa-width-one-half">
	<?php 
echo SAMUIKit\FormTemplates::signInForm(['textInputs' => [['label' => 'Email address', 'type' => 'email', 'name' => 'email', 'hint' => 'Your registered email address.', 'errorMessage' => 'Invalid email address.', 'value' => 'something is incorrect'], ['label' => 'Password', 'type' => 'password', 'name' => 'password']], 'createPath' => '/path/to/register', 'forgotLinks' => ['/path/to/reset/password' => 'Forgot password'], 'showPasswordOnClick' => 'ShowPasswordEventHandler']);