What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
How do I use buttons to link to anchor tags on my form?Asked by sinnickel on February 24, 2013 at 09:28 AM
I'm trying to use HTML to create a standard button (think <input type="button">) that will allow users to click the button to jump to another area of the form, but I cannot seem to get the code to function properly.
I've created two buttons on my Online Service Request (Pet Sitting and Dog Walking) and two corresponding anchors within the page to take the user to the desired section of the form. However, when I click on either button, nothing happens.
Can you help me? I want to eliminate the page breaks I have been using on this lengthy form and anchors seemed the perfect solution .. until I tired to implement them...
anchor tags jump create section thanks
You will need to put an event function to make your input type work e.g.
<input type="button" onclick="window.location='http://www.jotform.com'">
However to transfer data to another page will require you PHP knowledge as using input type button to go to another page will not send the data from the previous page form.
Alternatively, the most convienient you can do is by using a dropdown or radio button and set the conditional logic to view the selected choice.
Another way is by creating two(2) submit button and set the custom url to the next form. However, by doing this, you will receive two submission instead of one.
Lastly, you can download the form source code and create the PHP function that will handle the data.
If you need futher assistance let us now.
All I need to do is make the buttons link to an anchor tag within the same form, same page.
This is the code I have, using the information you provided:
<table border="0" cellspacing="0" cellpadding="0" width="80%">
<td width="40%" align="left"><input onclick="window.location='#sitting'" type="button" value="Pet Sitting" /></td>
<td width="40%" align="right"><input onclick="window.location='#walking'" type="button" value="Mid-Day Walking" /></td>
Nothing happens when either button is clicked.
I have created an alternative method that works minus the buttons you added which I replaced with links. I cloned your form and changed the link references for the coding in the html so that it would go to the specified section of your form.
You can see the demo version in action here http://form.jotform.us/form/30544581033144 and you will notice that the form links work and take you to the anchored section of your page now.
Please let me know if this will work for you or not and feel free to clone it back if it meets your needs.
This is an old thread. To better assist you, I have moved your concern to a new thread which you can see by following this link: http://www.jotform.com/answers/796449