Include a value from a hidden field as part of the html?

  • Profile Image
    illoprint
    Asked on January 29, 2011 at 12:00 PM

    For example to do things like passing via a link with http://www.jotform.com/form/xxxxxxxxx?name=JohnDoe

    and have the form start include in the HTML (similarly to what is possible within email notifications and auto-responders) 

    "Hello JohnDoe,"

    [rest of form]

    ---------

    Thanks,

    Francesco

     

  • Profile Image
    abajan
    Answered on January 29, 2011 at 08:36 PM

    It sounds workable to me. I'll test it out soon.

  • Profile Image
    illoprint
    Answered on January 30, 2011 at 03:53 AM
    Thanks!
  • Profile Image
    abajan
    Answered on January 30, 2011 at 07:41 PM

    Actually, I misspoke. I'm somewhat confused as to what exactly you're trying to accomplish. Are you planning to email users a link that when clicked will load a form? As part of that link, were you thinking of including a variable in the hidden field like {fullName} that will display the user's name in a greeting at the top of the form?

    Or were you thinking of a system of two forms where the user fills out the first form (which contains a hidden field) and when he submits it, is directed to another form (instead of a "thank you" page) that greets him by name? What exactly were you thinking of putting in the hidden field?

    Can you please expand on what you're attempting to accomplish? Because I'm getting more confused by the minute and I suspect I might be confusing you too!

  • Profile Image
    illoprint
    Answered on January 30, 2011 at 08:36 PM
    Hi - thanks for helping out.I was going to use the feature for something similar to case 1 you suggested to make the form somewhat personalized.The second case would be useful too but that would mean querying a DB of some sort?Thanks again! Francesco
  • Profile Image
    aytekin
    Answered on January 31, 2011 at 07:45 AM

    Create a .php page on your site, add the form to it and then include the variables you send from the URL to it.

    For example, if you have test.php?name=John%20Doe&

    Then you can show "Hello John Doe" in your site using this code:

    Hello <?=$_GET['name']?>

  • Profile Image
    illoprint
    Answered on February 02, 2011 at 10:50 PM
    Thanks. I believe JavaScript could do te trick too.Related question - in case I wanted to use this on a thank you page... Can the form pass the variables to the thank you page or another page?
  • Profile Image
    aytekin
    Answered on February 03, 2011 at 05:01 AM

    Yes, it can send the data to Thank You Page. Just enable Send Post Data.

  • Profile Image
    claire62
    Answered on July 29, 2011 at 06:15 PM

    Hi Would love an aswer to scenario 2

     

    Kind Regards

     

    Claire

  • Profile Image
    allanftd
    Answered on July 29, 2011 at 11:13 PM

    Hi Claire,

    I'm not sure what the scenario 2 is, but as what Aytekin shared on his last post, the details can be found here: http://www.jotform.com/help/51-How-to-Post-Submission-Data-to-Thank-You-Page

    If this is not what you're looking for, please let us know so that we can further assist you. Thank you for using JotForm!

    JOTFORM SUPPORT

  • Profile Image
    claire62
    Answered on July 30, 2011 at 08:48 AM

    Brilliant, thanks Allan

     

    My server script use on my server is ASP

     

    I created some script on a page and sent direct to that page by changing the Action in the form to show that I could read the form field and print it on a page or use in further scripting which worked fine.

     

    When I send to http://www.jotform.com/submit.php and set a Thankyou Custom url and turn on Send Post Data in Properties/Advanced no post data is recieved.

     

    Can I assume that the reason is that ASP will not work?

     

    Kind Regards

     

    Claire

  • Profile Image
    allanftd
    Answered on July 30, 2011 at 11:00 PM

    Hi Claire,

    Thanks for the update. To ensure that this method will work, please use PHP for best results.

    Please let us know if you need further assistance. Thank you for using JotForm!

    JOTFORM SUPPORT