Home > front end >  I want to add 94 at the beginning of the very number i insert
I want to add 94 at the beginning of the very number i insert

Time:06-26

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>

screenshot of the area

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

  • Related