user6517334
user6517334

Reputation:

How the button can also acts like a link

I want to create a button that also acts as a link. I want that because I have a form in my header, this form is multi-form actually so when the user clicked on the button I want it to redirect to another page and also continues to the second step of the form.

So basically, I have UserForm which is my parent form, and I have InstantQuote form which is in the header of the home page.

<button type="submit" className="btn button" onClick={this.continue}>
          Details
          <BsArrowRightShort />
        </button>

So I want to add something to this button to redirect to another page and at the same time continues to the form.

Upvotes: 0

Views: 44

Answers (1)

Niaz Estefaie
Niaz Estefaie

Reputation: 577

Instead of using button tag you can use an a tag and you can give the a tag the style which you wanted your button tag get.

<a href="#" className="btn button" onClick={this.continue}>
      Details
    <BsArrowRightShort />
</a>

Upvotes: 2

Related Questions