Skip to content

Instantly share code, notes, and snippets.

@syossan27
Created January 17, 2015 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syossan27/7ecf29875c31c2ee925f to your computer and use it in GitHub Desktop.
Save syossan27/7ecf29875c31c2ee925f to your computer and use it in GitHub Desktop.
// Laravel
<div class="control-group">
{{ Form::label('input01', __('validation.attributes.input01'), array('class' => 'control-label') )}}
<div class="controls">
<div class="input-prepend input-append">
<span class="add-on">@</span>
{{ Form::text('input01', 'myname', (Input::get('input01', Input::old('input01')), array('class' => 'input-xlarge')) }}
<span class="add-on">$</span>
</div>
<p class="help-block">This is an help text</p>
</div>
</div>
// Bootstrapper
echo Form::prepend_append(
Form::control_group(
Form::label('input01', __('validation.attributes.input01')),
Form::xlarge_text('input01'),
(Input::get('input01', Input::old('input01', 'myname'))),
$validation->errors->get('input01'),
Form::block_help('This is an help text')
),
'@', '$'
);
// Former
Former::xlarge_text('input01', 'Text input')
->blockHelp('This is an help text')
->prepend('@')->append('$')
->value('myname')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment