Dynamically Populate Form

  • Profile Image
    hosker4u
    Asked on July 22, 2011 at 09:59 AM

    I am aware you can populate fields with the iFrame url - but I am wanting to provide people a simple javascript snippint.

    It needs to be dynamicly populated so I can give people a "refferal id" in the javascript code to populate the field

    I hope you can help. I have tried the code bellow without success:


     

  • Profile Image
    hosker4u
    Answered on July 22, 2011 at 10:03 AM

    I also dont want to give them the full "source code" javascript as that is very messy, and want to ensure I can update the form easily.

  • Profile Image
    hosker4u
    Answered on July 22, 2011 at 01:19 PM

    I have a PHP solution that replaces some of your javascript with mine.

    http://pastebin.com/88pCavnf

    It detects input_49 with a value of 0 and sets it with a javascript variable I can change elsewhere.

    ----------------

    Is their a proper solution, rather than my hack.

  • Profile Image
    NeilVicente
    Answered on July 22, 2011 at 04:04 PM

    Hi,

    I believe this question is related to your comment in the user guide - How to Use a Single Form in Multiple-Sites and Know Which Site a Submission CameFrom

    Please click here to read my response to your comment. Let me know if it helps or not. If your question in this thread is not related to that comment, feel free to contact us again.

    Our support team are very eager in helping our users make the most out of Jotform. We will be looking forward to your response and queries. Thank you and have a great day!


    Neil