Embed edit link. Get url widget not working

  • Profile Image
    bhsc
    Asked on January 26, 2021 at 12:48 PM

    Hello,

    I'm having a hard time getting the get url widget to work in iframe on a edit submission link. it works on my desktop firefox browser but not my mobile iphone safari browsers. if you can please help me with a solution, this is a essential part of my business that's a must have to function. below I have the link and screen shot from my iphone.

    thanks


    https://www.cheaptradeline.com/test.html?id=4874915881425588663?yes


    1611683012_601054c4abdf1_screen.jpg

  • Profile Image
    Alexander_G
    Answered on January 26, 2021 at 04:55 PM

    Hello,

    Thank you for contacting us.


    Please, give us some time to prepare a workaround, we will get back to you soon.


    Thank you for your patience.

    Alex


  • Profile Image
    Alexander_G
    Answered on January 26, 2021 at 05:06 PM

    Please, could you specify the information for us:


    1. What did try to use an edit link or a custom one?

    2. How about the behavior of the form if you are using the non-embeded form?


    Thanks,

    Alex

  • Profile Image
    Alexander_G
    Answered on January 26, 2021 at 05:10 PM

    Update:


    Please, disregard my first question. Thanks.

  • Profile Image
    bhsc
    Answered on January 26, 2021 at 06:10 PM

    all non-embed works, it works on firefox desktop version embedded, it doesn't work on Microsoft edge desktop version, it doesn't work any mobile device. all my clients will be on mobile devices 100%. this is essential to me to have, if you can please provide a workaround that will be great. my host support html,css,javascript

    thanks

  • Profile Image
    Vick_W
    Answered on January 26, 2021 at 11:30 PM

    Hi there,

    Could you please provide the embed code that you are using? So we can check this further.

    Thanks

  • Profile Image
    bhsc
    Answered on January 27, 2021 at 09:24 AM

    <!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN"

    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8" />


    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> 

    </head>


    <iframe id="SubmissionEditIframe" onload="window.parent.scrollTo(0,0)" allowtransparency="true" allowfullscreen="true"

           allow="geolocation; microphone; camera" src="" frameborder="0" style="width: 0px;

     top: 0px;

     left: 0px;

    position: fixed; 

    min-width: 100%;

     min-height: 620px;

     border:none;"

    text-align:center;

           scrolling="auto">

       </iframe>


       <script type="text/javascript">

           let url_string = window.location.href;

           let url = new URL(url_string);

           let submission_id = url.searchParams.get("id");

            document.getElementById('SubmissionEditIframe').src = 'https://eu.jotform.com/edit/' + submission_id;

       </script>


    </body>


    </html>



  • Profile Image
    Lorenz_A
    Answered on January 27, 2021 at 10:06 AM

    Greetings,

    Can you please confirm if you're still getting the issue. I tested the website where the form is embedded, and the get page URL widget is working as expected, and the condition seems to work fine as well. I tested this using an IOS (safari browser)

    1611759787_601180ab33fc9_test - 2021-01-

    If the issue still persists, please try embedding your form using the iFrame code only and disregard the script tag.

    Here's the code below.

    <iframe id="SubmissionEditIframe" onload="window.parent.scrollTo(0,0)" allowtransparency="true" allowfullscreen="true"
    allow="geolocation; microphone; camera" src="" frameborder="0" style="width: 0px;
    top: 0px;
    left: 0px;
    position: fixed; 
    min-width: 100%;
    min-height: 620px;
    border:none;"

    text-align:center;
    scrolling="auto">

    </iframe>

    Please give it a try and let us know how it goes.

  • Profile Image
    Alexander_G
    Answered on January 27, 2021 at 12:12 PM

    Hi again.


    This might be the cross-origin policy. Browsers like Chrome&Safari keep increasing cross-origin restrictions. URL widget only takes the base URL instead of the full one which breaks the condition. However, it works on some versions of Firefox.

    Is it possible to implement a PHP workaround to your host for instance?


    Thanks,

    Alex


  • Profile Image
    bhsc
    Answered on January 27, 2021 at 12:57 PM

    Hello, I hope your getting my messages I keep gtting a error saying im going too fast when I reply.


    If your able to implement a javascript workaround that would be great. my host doesn't support php. but if php is the only way i will just need to find a different host. I don't mind moving to a different host, the url widget feature is a must have for my business to function. Can you please provide a workaround if possible.

    Thank You

  • Profile Image
    Alexander_G
    Answered on January 27, 2021 at 02:22 PM

    Thanks, we've got your reply.


    Please, allow us some time to check if there's a JS/PHP workaround.

    We will reply to you as soon as we get something on it.


    Thank you for your patience.


    Sincerely,

    Alex

  • Profile Image
    bhsc
    Answered on January 27, 2021 at 07:11 PM

    Thank you Alex,

    Ill be patiently awaiting your response.

  • Profile Image
    Lorenz_A
    Answered on January 27, 2021 at 10:40 PM

    Apologies for my first reply,

    I didn't notice that the script code was for the URL, I thought it was the full code in the iFrame embed section in the publish tab of your form builder.

    Can you please provide us more details about what you're trying to accomplish? as I can't seem to figure out the process you are working on and I apologize for that.

    As mentioned by my colleague, the GET PAGE URL widget will fetch the based URL in the address bar.

    We will wait for your response.



  • Profile Image
    bhsc
    Answered on January 29, 2021 at 01:05 PM

    Hello,

    I'm trying to Use the GET PAGE URL function to work in the Conditional logic in edit submission mode. However on my mobile device iphone X, and dekstop edge browser, the GET PAGE URL doesn't show the full url, it only show the domain, and nothing else it stops https://www.cheaptradeline.com , it doesn't show the full https://www.cheaptradeline.com/test.html?id=4874915881425588663?yes which is needed for the Conditional logic to work.. I have a conditional logic for the URL value containing "yes" but it won't show on my mobile device, or Microsoft edge. My clients are 100% mobile.

    hope this help with my question.

  • Profile Image
    Alexander_G
    Answered on January 29, 2021 at 02:45 PM

    Hello,


    I have consulted with my colleagues and did some tests. Even the PHP workaround is not working here because of the conditions related to get form page URL. However, this widget did not fetch the full URL of the page, but the Base URL when embedded. :(

    Now I escalated your issue as a request to our Developers.


    As an another suggestion - if you have programming skills, you can try to create your own widget via https://www.jotform.com/developers/myapps/. Through here, you can also create your own apps which you can integrate with your forms via API.

    You can also check out the API documentation page for more information: http://api.jotform.com/docs/

    Note: Your widget is currently only visible only to you unless you send it to us for approval.


    We appreciate your patience regarding this matter.

    Thank you again,

    Alex



  • Profile Image
    bhsc
    Answered on February 02, 2021 at 12:24 PM

    Hello I believe this script may be a issue as it will load anyone submission ID, can you guys help me make it unique to dynamically load any submission ID for a specific form only.

    Also I’m not a coder I found this script on your forum and thought it would help me but this is one of its flaws.

    Thanks,

  • Profile Image
    Alexander_G
    Answered on February 02, 2021 at 02:05 PM

    Hello,

    Thank you for your reply.


    Can you guys help me make it unique to dynamically load any submission ID for a specific form only.

    I am not sure that I understand your issue correctly, could you please elaborate?


    Hmm, I am not sure that the problem is in the script, but in a widget's internal code.

    However, I noticed that you are referring to eu.jotform.com. Please, use our main domain in your script.

    I have edited your script for your convenience.

      <script type="text/javascript">
           let url_string = window.location.href;
           let url = new URL(url_string);
           let submission_id = url.searchParams.get("id");
           document.getElementById('SubmissionEditIframe').src = 'https://jotform.com/edit/' + submission_id;
      </script>

    

    Thanks,

    Alex

  • Profile Image
    bhsc
    Answered on February 02, 2021 at 02:46 PM

    Hi thanks for getting back with me ,

    To elaborate if someone was to go to my site and change the submission ID number in the url they may potentially brings up someone else’s information and it will be displayed on my website which is not what I want. I want only my form which match the submission ID to my form to be displayed only otherwise a user should receive an error or a blank page.

    for example you may use the link below and change the submission ID to any valid submission ID and it will bring up that information on my page. Which is not what I want.

    is there a way to include the form ID to match the submission ID in the script?


    thanks


    https://www.cheaptradeline.com/test.html?id=4874915881425588663



  • Profile Image
    Alexander_G
    Answered on February 02, 2021 at 04:19 PM

    I am not sure that I understand your workflow correctly,

    However - you can try to tick Require log-in to see submissions

    On this page: https://www.jotform.com/myaccount/settings

    1612300484_6019c0c465dfc_

    Also, please check this related thread:

    https://www.jotform.com/answers/1101492


    Thanks,

    Alex



  • Profile Image
    bhsc
    Answered on February 03, 2021 at 06:39 AM

    I found the solution to my original question, I just need to disable “prevent cross-site tracking” for my safari browser, also my Firefox browser on my iPhone . Is there a way to bypass this.? This is automatically checked on all iPhones


    1612352360_601a8b6835680_9AF415A0-4C36-41612352359_601a8b675c5e6_FBD97A52-6BEA-4

  • Profile Image
    Lorenz_A
    Answered on February 03, 2021 at 08:19 AM

    Hi there,

    Glad to know that you were able to find your way to fixing the issue.

    Unfortunately, it's not possible with JotForm to disable/bypass that feature. though you can try including a reminder message in the form using a paragraph text, indicating to disable the cross-site tracking for iPhone users.

    I hope this helps. Let us know if you need any further assistance.