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

    Prepopulate values between forms has problems with special characters in fieldnames.

    Asked by Schwob on August 23, 2016 at 11:05 AM

    most of my fields work, but unfortunately, some values won´t get transmitted correct due to URL-masking of specific named values.

    e.g. values from checkboxes or radiobuttons named with "ä" or "/" get obviously translated duing the URL-Transmission and can´t get reassembled correctly, so the new form misses those prepopulations cause ´won´t find the right value. Workaround is to change or simplifiy valuess, but this is not so pretty.

     

    Problems get worse when i use a WebApp (GoogleDrive) which catches the values with Get(e) and put the URL-Parameters to a new link for the second form together. Is this a Problem with different Coding of the Special characters?

     

     

    Page URL:
    https://form.jotformeu.com/62346764954366

    special characters special in values
  • Profile Image
    JotForm Support

    Answered by Chriistian on August 23, 2016 at 12:12 PM

    I am currently checking your form. Please allow me to further check the issue. I will get back to you as soon as I found a solution to the issue. Regards.

  • Profile Image
    JotForm Support

    Answered by Chriistian on August 23, 2016 at 12:32 PM

    As per further investigation, I tried to prepopulate your form (https://form.jotformeu.com/62346764954366 ) for the fields with values "/" and "ä" characters but I was not able to replicate the issue. The prepopulate link is loading the values properly.

    https://form.jotformeu.com/62346764954366?papiersorte=ColorCopy 100 g/qm&lieferung=Selbstabholung Express (Am nächsten Werktag ab 14 Uhr)

     

     

    I have tried this using Chrome and Firefox browser. Can you provide us a sample prepopulated form link where you encountered this issue so we can further investigate? If you can also share to us the WebApp you created so we can also check the issue on your WebApp. 

     

    We will wait for your response.
    Regards.

  • Profile Image

    Answered by Schwob on August 23, 2016 at 12:52 PM

    please check: first form (sending values to second form) you can use the standard-Settings, just send it like it is, the fields "Lieferung" at the bottom and the value "cremé" for Paperback-cover don´t  work.

     

  • Profile Image

    Answered by Schwob on August 23, 2016 at 12:55 PM

    Google drive webApp uses e.queryString to create the new link, this is the main part of the script.

    But this is surely due to my 1 day JavaScript experience ;-)

     

    function doGet(e) {

      var urlparams = e.parameter;
      var newname = urlparams.auftragsnummer;
      var mailadresse = urlparams.email;

      PfadB = '<a target="_blank" href=\"https://form.jotformeu.com/62353075331348?'+e.queryString+'">Formular Bearbeiten</a>'
      MailApp.sendEmail({
     to: mailadresse,
     subject: "Link zu Auftrag "+newname,
     htmlBody: "Hier finden Sie Ihre Buchdecke zum Bearbeiten: PFAD A Und hier ist der Link zu Ihrer Anfrage:" +PfadB +"  "
     });        
    }

     

  • Profile Image
    JotForm Support

    Answered by Kevin_G on August 23, 2016 at 03:16 PM

    I have just tested the app and I can see it works fine, I have cloned your form and I'm redirecting the value to another form via the URL, this is the link that I've currently set up as thank you page: https://form.jotform.com/62355673205960?lieferung={lieferung} 

    You can also test my cloned form of yours, here is the link: https://form.jotform.com/62355993155969 

    It will redirect you to the second one shown in my screenshot. 

    Regarding to the Google Drive app, based on the documentation the "e.queryString" should have the parameters that you need to be passed over the URL, example: 

    "queryString": "papiersorte=ColorCopy 100 g/qm&lieferung=Selbstabholung Express (Am nächsten Werktag ab 14 Uhr)"

    You can also check the Google documentation about this on the next link: https://developers.google.com/apps-script/guides/web 

     

  • Profile Image

    Answered by Schwob on August 24, 2016 at 03:50 AM

    Hi Kevin, thank you very much for your fast replies.

    Very sorry it still didn´t worked. Maybe because i use the european databes or the IE? I changed the field names in both forms from

    Selbstabholung Express (Am nächsten Werktag ab 14 Uhr)

    to

    Selbstabholung Express (Am folgenden Werktag ab 14 Uhr)"

    and

    cremé to creme 

    and it prompt worked. So problem is on characters "é" and "ä", "/" works. When i copy the resulting old (not working) URL, it was looking like:

    ...&lieferung=Expressversand (Lieferung am nächsten Werktag bis 12 Uhr)&...

    an i still guess the problem lies in URL character encoding für "ä" = "ä".

    (For the character "/", the URL keeps unchanged: ..&papiersorte=DNS Premium 120 g/qm...)

    As a workaround i will try to change all special characters in fieldnames. But it would be interessting how to solve the underlying reason for the problems.

    ALso, i found this helpful info: http://www.url-encode-decode.com/

  • Profile Image
    JotForm Support

    Answered by Chriistian on August 24, 2016 at 05:21 AM

    I am glad to know that you found a workaround for your issue. Since the URL parameter works correctly when entered directly to the URL bar instead of through the webapp, it looks like the url is not being encoded properly when the value is passed to your script. Please allow me some time to investigate this further and I will get back to you once I have a possible script that you can try. Regards.

  • Profile Image
    JotForm Support

    Answered by Chriistian on August 24, 2016 at 05:30 AM

    I believe we may need to encode the parameter first before it is passed to the link so that the url is displayed correctly after. For this, we can use the function encodeURI(). Please try out the code below where I have modified the code to include this function as highlighted below

    function doGet(e) {

      var urlparams = e.parameter;

      var newname = urlparams.auftragsnummer;

      var mailadresse = urlparams.email;

     

      PfadB = '<a         target="_blank" href=\"https://form.jotformeu.com/62353075331348?'+encodeURI(e.queryString)+'">Formular Bearbeiten</a>'

      MailApp.sendEmail({

     to: mailadresse,

     subject: "Link zu Auftrag "+newname,

     htmlBody: "Hier finden Sie Ihre Buchdecke zum Bearbeiten: PFAD A Und hier ist der Link zu Ihrer Anfrage:" +PfadB +"  "

     });         

    }

    Please let us know if the issue still persists.
    Regards.

  • Profile Image

    Answered by Schwob on August 24, 2016 at 05:46 AM

    Thanks alot! I will try it as soon as possible and give you a feedback. But this looks good.

    Just that you konwo what i am planning: My workflow is a bit tricky:

    We use a first (small) calkulator-form to give our customers a quick price info. This form is also calculating the thickness of a hardcover-block dependig on the entries. If the customer submitts this form (email has to be entered), our script selects the fitting GoogleSlide-Template on our GoogleDrive, copies this, renames it with the unique job-ID, set´s the neccessary edit rights.

    Then it sends an mail to our customer with the url-link to the individual template (so he can create his own fitting bookcover), and also a link to the (with the values of the small form) prepopulated second order form. this second form is the finale order-form, prepopulated with the first values and gets enriched with all neccessary fields like adress, phone, etc. 

    customer can also change values in the second form, if they don´t result in a different block-thickness to the original request (i will prevent this with conditions)

    with this second form the customer can finalize the order-process.

     

    it´s complicated thing ;-)