protect URL pre-populated fields

  • Profile Image
    sulzenbacher
    Asked on March 17, 2012 at 04:29 AM

    Hi,

    I found your solution to protect pre-populated fields by adding disabled="disabled" to the source code.
    I am pre-populating fields by URL parameters (field answers from one form appear in another form) and i now would like to lock these fields in the second form so they cannot be changed.

    I cannot figure out how the "disabled" solution would help me with my problem, since I cannot change the source code of the form itself, or am I wrong?

    Thanks a lot
    Johan

  • Profile Image
    abajan
    Answered on March 17, 2012 at 05:15 AM

    Hi Johan

    It's possible to pre-populate the content of locked fields. However, since the source code of JotForm hosted forms cannot be edited, the full source would need to be obtained from the Embed Form Wizard (Setup & Embed tab > Embed Form), embedded into a web page and edited to suit. Moreoever, in order for the data in locked fields to be successfully submitted, readonly must be substituted for disabled.

    To see this solution in action, go to

    http://formdemos.awardspace.biz/formTemplate95.html?fullName3[first]=John&fullName3[last]=Doe&email4=johndoe@example.com

    If you need clarification on anything, do let us know.

  • Profile Image
    sulzenbacher
    Answered on March 17, 2012 at 05:26 AM

    Hi abajan,

    thank you for your fast reply. But I wonder how pre-populating by URL would work this way?

    I have form 1 which is filled out by someone and then a notification e-mail is sent with an URL (+parameters from form1) that leads to a copied (and extended) form 2. URL-pre-populated fields should be locked now. If form 2 is embedded in my website it has an URL for itself, how would the Jotform URL parameters (who automatically fill out my form) work with this form?

    I hope it is understandable what I mean.

    Thank you
    Johann 

  • Profile Image
    abajan
    Answered on March 17, 2012 at 05:56 AM

    I think I understand but just to be sure, please provide the following:

    1. The URL of the page in which form 2 is embedded
    2. The URL of form 1

    Having this information would allow me to provide a more tailored solution.

    (I've made the thread private in case there's a concern about having your forms publicized on the general forum.)

  • Profile Image
    sulzenbacher
    Answered on March 17, 2012 at 06:47 AM

    Hi abajan,

    thank for your amazing support. I gave it a try by myself and just added the parameters (the part starting with ?) to my own URL and wow - it works!

    Thanks again
    Johan

  • Profile Image
    abajan
    Answered on March 17, 2012 at 06:49 AM

    You're quite welcome, Johan.

    Enjoy your weekend :)

  • Profile Image
    abajan
    Answered on March 17, 2012 at 06:52 AM

    Incidentally, since there was no need to make thread private after all, I have made it public again for the benefit of others needing a similar solution.