-2

I am trying to redirect users who click a submit button to a seperate page, while simultaneously submitting their data.

I have tried to use <a> tags around the div but this doesn't change where my submit location goes (refreshes the page).

I am on Hubspot COS, but this should be relatively the same...

Here is my html:

<div class="hs_submit">
<div class="hs-field-desc" style="display: none;"></div>
<div class="actions"><input class="hs-button primary large" type="submit" value="Submit">
knocked loose
  • 3,142
  • 2
  • 25
  • 46

2 Answers2

2

You're not using <form> and you should.

<form action="newpage.php" method="get">
    <input class="hs-button primary large" type="submit" value="Submit">
</form>

You can also use POST as opposed to GET, depending on your needs. Change newpage.php to whichever page you want to direct the user to. That page should also be able to process or handle the input from the form.

Muhammad Abdul-Rahim
  • 1,980
  • 19
  • 31
0

In Hubspot's COS, use a "landing page" when using a form rather than a "site page".

On the landing page edit page, immediately under where you select the form is the option to either direct to a new page (and you then enter in where to direct) or provide an inline edit thank you.