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

    Conditions not working when copying the source code

    Asked by hoho32 on September 15, 2014 at 02:04 PM

    I've setup a condition it works only on the form domain http://form.jotform.me/form/42553579206459?

    but not on my domain, where i got the full source code in my page http://molham.ae/nabbesh/register-client.html

     

     

     

    source domain full source code register conditional statemen
  • Profile Image
    JotForm Support

    Answered by jonathan on September 15, 2014 at 03:32 PM

    Hi,

    Please take note that every time you uses the jotform full source code embed on your website, you will need to re-embed the jotform always if the jotform is updated/modified.

    Otherwise, if you do not re-embed, the version of the embedded jotform will not be the same to the updated jotform.

    After updating jotform, please re-embed again the full source code into your website. Then check if the conditions are now working on the embedded jotform.

    Hope this help. Inform us if issue persist.

    Thanks!

     

  • Profile Image

    Answered by hoho32 on September 15, 2014 at 03:35 PM

    i've already did that, same issue. 

  • Profile Image
    JotForm Support

    Answered by david on September 15, 2014 at 05:06 PM

    Hi,

    I embedded a cloned version of your form in to a test page using the source code and the condition based on your radio button seemed to work just fine.  However, when I tested your embed code, the condition did not work.  Here a tested working version of your forms source"

    http://pastebin.com/TYu8nUYs

    That code should be the proper source embed.

    If you are still having trouble after embedding that code.  Let us know and we will see what else we can do,

  • Profile Image

    Answered by hoho32 on September 16, 2014 at 03:14 AM

    Thanks! it works now! 

    I don't know where was my problem :) if i found out or duplicated that problem again i will let you know!

  • Profile Image
    JotForm Support

    Answered by ashwin_d on September 16, 2014 at 06:41 AM

    Hello hoho32,

    On behalf of my colleague, you are welcome.

    Do get back to us if you have any questions.

    Thank you!

  • Profile Image

    Answered by hoho32 on September 16, 2014 at 06:56 AM

    I actually wanted to asked you, how i can apply the conditions from the jotform and take only there source code and apply it on the form.

    I just wanted to find the code where jotform execute for these conditions, where i can find them?

     

      

  • Profile Image
    JotForm Support

    Answered by ashwin_d on September 16, 2014 at 08:54 AM

    Hello hoho32,

    If I understand your question correctly, you need to just copy the condition codes from your JotForm's source code is that correct?

    When you download your JotForm's source code, you will see the JavaScript code added there. Please check the screenshot below on where to find the conditions in the source code: 

    Hope this answers your query.

    Do get back to us if you have any questions.

    Thank you!

  • Profile Image

    Answered by hoho32 on September 16, 2014 at 12:13 PM

    Ok i got the code thanks, but this one hides the input only, i wanted to hide the whole li, is there a js code i write to hide the whole <li> if i didn't clicked on the radio checkbox 

     

  • Profile Image
    JotForm Support

    Answered by ashwin_d on September 16, 2014 at 01:32 PM

    Hello hoho32,

    I am not sure what all changes you have made in your form's source code. It seems the condition to show hide the field was added later after downloading the from's source code. This is the draw back of embedding form with its source code. You have download the form source code again and embed it in your web page.

    For now you can try to use the conditions from the following URL and see if that solves this problem: http://pastebin.com/pVaCWeuQ 

    Do get back to us if the issue persists.

    Thank you!

     

  • Profile Image

    Answered by hoho32 on September 18, 2014 at 03:04 AM

    no it didn't work I've solved this issue by this code

     

    // we target the element from which we want the click action to be
        document.querySelector('#q5b').addEventListener('click', function() {

            // skips to which field you want
            fform._showField(4);


            // we need this if we want to go to the final OVERVIEW part
            setInterval(function() { document.querySelector('.fs-continue').click(); }, 200);
        });

  • Profile Image
    JotForm Support

    Answered by ashwin_d on September 18, 2014 at 05:10 AM

    Hello hoho32,

    I am glad to know that you solved it yourself.

    Do get back to us if you have any questions.

    Thank you!