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

    Autofilling from a custom form, over to jotform

    Asked by morriswu on December 07, 2012 at 05:14 AM

    Hi Jotform, your service is great, and I tell all my clients to use you guys. Right now, I'd like to see if we can implement this for one of my clients -- 

    We have 2 forms -- a custom form, and a reservation form on jotform

    I have a custom form set up which has the fields for the number of guests, the check in date, and the check out date. 

    What I'd like to do is to make it so that when I hit submit on the first form, it would populate the data on the reservation form. 

    The form I'd like to populate the data on is the "Inquiry" form on Jotform.

    I tried testing this by naming the number of guests field on the custom form input_13 ( i.e the same as on jotform), but when I click submit, it doesn't transfer over the data. 

     

    --

    You can replicate this by going to http://opohills.com/taipei-rentals.php and entering information right under the slider

    --

    The code for my custom form is --

     

                <form id="formElem" name="formElem" action="form.php" method="post" >

                 <div class="icon">

                  <select id="input_13" name="capacity" >

                    <option value="1">1</option>

                    <option value="2">2</option>

                    <option value="3">3</option>

                    <option value="4">4</option>

                    <option value="5">5</option>

                    <option value="more">6+</option>

                  </select>

                  <span><img src="img/man.png" /></span>

                 </div>

                 <div class="icon">

                  <input id="txtFromDate" name="check_in" placeholder="mm/dd/yy" type="text" readonly="readonly" AUTOCOMPLETE=OFF />

                  <span><img src="img/calendar.png" /></span>

                 </div>

                 <div class="icon">

                  <input id="txtToDate" name="check_out"   placeholder="mm/dd/yy"  type="text" readonly="readonly" AUTOCOMPLETE=OFF />

                  <span><img src="img/calendar.png" /></span>

                 </div>

                 <button id="btn_room_search" type="submit" class="secondary button submit_button">Inquire Now</button>

     

                </form>

    Page URL:
    http://opohills.com/taipei-rentals.php

  • Profile Image
    JotForm Support

    Answered by NeilVicente on December 07, 2012 at 07:33 AM

    What you want to accomplish requires custom PHP scripting. The custom form's values need to be transferred over to the other form by use of PHP POST. That means you will have to modify the custom form's processor page, which is form.php.

    This obviously needs more than basic PHP knowledge and is a little out of our scope as JotForm supporters. If you aren't too knowledgeable about PHP, I'd suggest hiring someone to do this for you.

  • Profile Image

    Answered by morriswu on December 07, 2012 at 07:38 AM

     

    Hi Neil, I understand PHP enough to hack through this. I managed to populate the values over, but, I'm having trouble changing the value of the jotform. Please take a look at this question -->

    http://www.jotform.me/answers/155072-Jotform-Iframe-getElementbyID#0