Open page with active form

Asked

Viewed 40 times

1

I would like to know how to open a new page with an active form field, because by default when you open a page no field is active, ie you need to go with the mouse and click on some field, it is not possible to navigate directly with TAB.

Example:

            <div class="row">


                <div class="col-md-3">

                    <div class="form-group" >
                        <label class="col-md-12" >CAMPO1</label>
                        <div class="col-md-12">
                            <input name="campo1" type="text" class="form-control" >
                        </div>
                    </div>

                </div>

                <div class="col-md-3">

                    <div class="form-group" >
                        <label class="col-md-12" >CAMPO2</label>
                        <div class="col-md-12">
                            <input name="campo2" type="text" class="form-control" >
                        </div>
                    </div>

                </div>                          

            </div>

As I would do in the case above the keyboard is already set in the field 1 direct to fill?

1 answer

3


Add autofocus in the input tag you want to do this, example

<input name="campo1" type="text" class="form-control" autofocus>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.