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.


  • Profile Image

    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...

     

    Thanks!

    Page URL:
    http://form.jotform.com/form/13161844305

    anchor tags jump create section thanks
  • Profile Image

    Answered by jefreylandicho on February 24, 2013 at 10:34 AM

    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.

  • Profile Image

    Answered by sinnickel on February 24, 2013 at 11:00 AM

    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%">

    <tbody>

    <tr>

    <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>

    </tr>

    </tbody>

    </table>

    Nothing happens when either button is clicked.

    Any thoughts?

  • Profile Image
    JotForm Support

    Answered by KadeJM on February 24, 2013 at 12:48 PM

    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.

  • Profile Image

    Answered by miguelben on March 16, 2016 at 09:06 PM

    I tried your system Kade, and it worked fine when I opened the form directly on the browser, but when I embed it into a page, it didn't work. Is there any way around this?
  • Profile Image
    JotForm Support

    Answered by Chriistian on March 16, 2016 at 10:46 PM

    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 

    Regards.