I want to add 94 at the beginning of the very number I insert from this input area. This is POS system which is written under laravel framwork.
<div >
<div >
{!! Form::label('mobile', __('contact.mobile') . ':*') !!}
<div >
<span >
<i ></i>
</span>
{!! Form::text('mobile', null, ['class' => 'form-control', 'required', 'placeholder' => __('contact.mobile')]); !!}
</div>
</div>
</div>
CodePudding user response:
<div >
<div >
{!! Form::label('mobile', __('contact.mobile') . ':*') !!}
<div >
<span >
<i ></i>
</span>
{!! Form::text('mobile', '94', ['class' => 'form-control', 'required', 'placeholder' => __('contact.mobile')]); !!}
</div>
</div>
</div>
You should change second parameter 'null' to '94' of Form::text, it's a default value.
You can learn more from laravel's documentation : https://laravel.com/docs/4.2/html