Is it possible to clear a form page yet preserve a score and another value while repeated a page?

  • jayhobbs21
    Asked on December 9, 2017 at 2:03 AM

    This is the ultimate goal scenario:

    I will be setting up some REALLY complicated conditional logic with multiple Page Skips, going through THREE pages on the form SIX times, in a different order each time.  My intention is to reduce the coding and re-coding, and re-coding, since I will be making up to 80 versions of this.  Each version will have some different audios that play and the different answers the user must respond with.  If I can limit the form to 3 pages of 8 audio-question sets per page, but get enough training (8 questions x 3 pages x 6 repetitions = 144 total questions) and random-ness by repeating the pages in apparently random order in which the  pages display.

    I am trying to set up, and would appreciate your guidance in setting up a:

      1) page counter:  When user selects NEXT, Page counter increases by 1

      2) Series counter:  When 3 pages completed, Series counter increases by 1 (Page counter/3)

      3) Based on the combination of Page counter and Series counter, the Conditional Logic SKIP TO page is applied.  Each Series increase, the Skip Logic will differ so that the 3 pages are not repeated in the same order on each series.

      4) Function to clear the entries of a page right after it is completed, while maintaining the 1) total Quiz score, 2) Page counter, 3) Series counter.  

    I set up a super simple version (1 question per page) to test this out.

    Thank you.


  • Welvin Support Team Lead
    Replied on December 9, 2017 at 10:07 AM

    1. There is no way you can trigger the calculation by next button. My suggestion would be to add the number when one of the fields on the next page is filled. I'd also suggest making it as a required field so this way, they cannot move forward without filling it up. So this case, the calculation is always getting the correct number of pages.

    You can do this with a condition or simply get the values from the fields. Let's say, the radio button that you are currently using. 


    2. Since this involves a skip logic, I'd suggest getting the total by a condition. But still, you need to use the fields on every page to get the total.

    For example;

    IF fields from "Page 1", "Page 2", "Page 3" is filled then CALCULATE Page 1 value + Page 2 value + Page 3 value + 1. 

    I hope you get this, this is a simple one. Here's a demo: https://www.jotform.com/73414347707963

    Here are the conditions:

    Is it possible to clear a form page yet preserve a score and another value while repeated a page? Image 1 Screenshot 20

    They are the same, but the next one adds 1 for the series.


    3. This isn't complex as far as I understand this. If there are different series, especially a combination of pages, then you should just select the correct calculation in the condition to skip.

    Just add the condition as it is, guide: https://www.jotform.com/help/350-How-to-skip-pages-using-conditional-logic


    4. What's the purpose of this? It's no use if you will just redirect the users to the same pages since the conditions/calculations will always clear the values. Otherwise, you'll get an incorrect result afterward. I would advise keeping them in order then just continue on skipping pages by the condition. Afterall, they are randomly being skipped to different pages. Is this correct? 


    I hope that helps and I hope my answers are aligned with your questions. 

  • jayhobbs21
    Replied on December 9, 2017 at 10:41 AM

    Thanks or your thorough answer Welvin.  I will contemplate your answer.

    I could use the LAST-field-on-a-page-IS-FILLED as the condition since I will not be using every page in every series.

    To answer your question (Thank you for trying to understand.):

    I am doing all these gymnastics to avoid hundreds of hours of extra work, since there is not Find-and-Replace expressions function.   - I know I could have 15 pages of 10 questions to get the 150 questions in, but that will be a great deal of work since, without this complicated page-repeat activity, I have 10 pages of 10 questions (152 questions), and I will be creating 9 versions (1350 questions) and 6 or more separate classes of those 9 versions (8100 questions). ...and each question will have an audio file identified by a URL that would need to be changed (re-enter 8100 URLs).  Each form will only have 3-6 distinct audio files (6 URLs) and the same 2 answers every time that url appears.  In some ways, it is quite simple, but the many versions that must have their URLs manually replaced makes it a massive undertaking.

     

  • Welvin Support Team Lead
    Replied on December 9, 2017 at 12:03 PM

    You're welcome.

    Thank you for the additional information, and I understand. My suggestion should work for you. However, I am not sure if the form can handle the massive number of fields that you have mentioned. It can, maybe, but the consequences such as the speed might not be user-friendly. I'd recommend optimizing it. Maybe use a separate document containing a table of your audio files. 

    Please get back to us if you need further assistance.

  • jayhobbs21
    Replied on December 9, 2017 at 4:05 PM

    Thanks or your thorough answer Welvin.  I will contemplate your answer.

    I could use the LAST-field-on-a-page-IS-FILLED as the condition since I will not be using every page in every series.

    To answer your question (Thank you for trying to understand.):

    I am doing all these gymnastics to avoid hundreds of hours of extra work, since there is not Find-and-Replace expressions function.   - I know I could have 15 pages of 10 questions to get the 150 questions in, but that will be a great deal of work since, without this complicated page-repeat activity, I have 15 pages of 10 questions (150 questions) and I will be creating 9 versions (1350 questions) and 6 or more separate classes of those 9 versions (8100 questions). ...and each question will have an audio file identified by a URL that would need to be changed (re-enter 8100 URLs).  Each form will only have 3-6 distinct audio files (6 URLs) and the same 2 answers every time that url appears. 

    In some ways, it is quite simple, but the many versions that must have their URLs manually replaced makes it a massive undertaking.

     

    Additionally, I am having trouble increment a field up multiple times.  I seem to get an endless loop/freeze when I try to use conditional logic like: Filed A +1 = Field A.  I see that seems to be an issue ( https://www.jotform.com/answers/1203558-Is-there-a-way-to-increment-a-number-field-based-on-conditional-logic ).  Is this resolved?

     

  • Support_Management Jotform Support
    Replied on December 9, 2017 at 5:45 PM

    To stay on topic and avoid confusion, I moved your additional question to a separate thread:

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

    We'll attend to it shortly.

  • jayhobbs21
    Replied on December 9, 2017 at 7:09 PM

    I appreciate the clarity of separate threads, but an accurate answer necessitates the complexity of the whole situation.

    I am trying to set up, and would appreciate your guidance in setting up a:

      1) page counter:  When user selects NEXT, Page counter increases by 1

      2) Series counter:  When 3 pages completed, Series counter increases by 1 (Page counter/3)

      3) Based on the combination of Page counter and Series counter, the Conditional Logic SKIP TO page is applied.  Each Series increase, the Skip Logic will differ so that the 3 pages are not repeated in the same order on each series.

      4) Function to clear the entries of a page right after it is completed, while maintaining the 1) total Quiz score, 2) Page counter, 3) Series counter.  

    **********

    As I understand it from what you have said:

     - Answer to #1) Welvin said(Answered on December 09, 2017 at 10:07 AM)

     - Answer to #2) "Since this involves a skip logic, I'd suggest getting the total by a condition."  "IF fields from "Page 1", "Page 2", "Page 3" is filled then CALCULATE Page 1 value + Page 2 value + Page 3 value + 1. ") 

    I can get the Cond Logic to work great one time through, but when I try to get the counter to go up again, as would be necessary when on a page has been completed twice. So, this is where I am running into trouble:  I am having trouble incrementing a field up multiple times.  I seem to get an endless loop/freeze when I try to use conditional logic like: Filed A +1 = Field A.  

    So, the answer on the new thread (https://www.jotform.com/answers/1318892) is "One way around this is to use CALCULATION VALUES if you will be triggering the increment through a field that supports calculation values."  The example form (https://www.jotform.com/73427272043957)  might work, if I had them answer an extra counter question at the end of each page they completed.

    Does it sound like I understand you correctly?  

    UPDATE:  As I am trying to implement this, all I am able to do is add one field's value to another.  This will not work, because the value will not increment when the page is repeated, it will simply stay the same value, since there is not a field variable that is increasing, only a field variable that is being updated.  That works fine if we only go through once, but this does not address the question in light of Questions #3-4.

  • Kevin Support Team Lead
    Replied on December 9, 2017 at 10:16 PM

    I'm not sure if this will be possible to do with JotForm, the counter you're trying to achieve seems to be a bit complex and as far as I can see the conditions will not work for you (since they cannot increment on the way you need and since that may considerable increase  the loading time  of the form). 

    The only close widgets that I found are these ones: 

    https://widgets.jotform.com/app/form_tabs - This will show the page number. 

    https://widgets.jotform.com/app/progress_bar - This will show a percentage of filled fields. 

    As an alternative, you may create a custom script to achieve this, here is the guide: https://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form 

    Thanks. 

  • jayhobbs21
    Replied on December 9, 2017 at 11:39 PM

    Thanks Kevin. 

    Anyone else have an idea?  I'm working hard at this stage, b/c it can mean the difference of hundreds of hours, and exponentially increased potential for errors in typed URLs. 

    Big picture:  On any one version of a training form, I have only 4, 3-second audios (ex. A,B,C,D) with associated question sets, 2 questions and 2 answers about each.  The questions are the same, but the audio and answers are different for A, B, C, and D.

     - I will provide the answer immediately after each question is answered 

     - I will present each of the 4 sets of audio, questions, and answers a total of 38 times in one session.  (38 x 4 = 152 audio question sets, totaling about 450 seconds (7.5 min) of audio playing time)

     - I will be making up to 9 versions of this form, varying only by the audio file that is presented before the question.  The answers will remain the same. For each form version, there are 152 questions, and I will be creating 9 versions (1350 questions) and 6 or more separate classes of those 9 versions (8100 questions). ...and each question will have an audio file identified by a URL that would need to be changed (re-enter 8100 URLs). 

     - BIG Problem to solve:  Since there is not a Find-and-Replace expression function, I am trying to find a way to limit the number of times I will be replacing the audio files' URLs.  The only way I have imagined is by making fewer pages and repeating them within a session.

    Thank you for your consideration.

  • Nik_C
    Replied on December 10, 2017 at 3:33 AM

    I read the whole thread and from what I understood, the main issue you're having is how to retain the number of pages visited when you skip them.

    If that is what you're trying to achieve, it might work if the pages that you skip them to are not repeated (which I assume you actually want to do to reduce the number of pages).

    So, if you want to repeatedly increase the number of pages field by using the same pages, I'm afraid that it is not possible, and it will happen what you saw already, it will just loop the same increasing.

    If, on the other hand, you want to do the same but with new pages (which will obviously increase the number of them) that would work with the logic presented by my colleague Welvin where you can increase the number of pages field by using the conditional logic. Again, I assume this cannot work for you because of the number of pages used.

    So if the first option is the only one, then the only way would be to download source code of the form and apply the logic by using JavaScript where in a field, you will increment with each click of the Next button. 

    Here is a simple logic that can increment with click: http://jsfiddle.net/Dfprp/

    Hope it helps.

    Let us know if you have any further questions.

    Thank you!

  • jayhobbs21
    Replied on December 11, 2017 at 12:55 PM

    I found a way to create a counter within JotForm, I think, but I am left with the problem of:

    Question #4) Function to clear the entries of a page right after it is completed, while maintaining the 1) total Quiz score, 2) Page counter, 3) Series counter.  

    2 Questions:

     A) So, setting that aside for a moment, If I wanted to put the source code on my website, that would have distinct advantages of being able to put it in a text editor where I could use FIND-and-Replace function, right? (If so, then I no longer have the need for the gymnastics of reducing the number of pages and the Skip-Logic, or at least most of it.)

    B) I followed the get-source-code directions, but (here's where I may look silly) when I copied and pasted it into my TEXT window of my WordPress site, it only showed the first page and looked very 1990's-style formatting.  Where am I supposed to paste the code?

  • Nik_C
    Replied on December 11, 2017 at 1:52 PM

    Question #4) Function to clear the entries of a page right after it is completed, while maintaining the 1) total Quiz score, 2) Page counter, 3) Series counter.  

    This could work only if a user is redirected to a new page (the page he didn't visit), then the counter will just continue with increment. 

    On the other hand, if you want to use the same pages and clear just the filled data (not the counted data) and continue to increment, I'm afraid that is not possible with the current setup and our builder.

    A) So, setting that aside for a moment, If I wanted to put the source code on my website, that would have distinct advantages of being able to put it in a text editor where I could use FIND-and-Replace function, right? (If so, then I no longer have the need for the gymnastics of reducing the number of pages and the Skip-Logic, or at least most of it.)

    The Source code should work the same, the issue is that the changes on the form will not reflect live on the website, you would have to re-embed the form.

    But I'm afraid that it will not work with Wordpress and it doesn't look good as you noticed as well. I'm sorry I overlooked that you are using WordPress. In that case, the plugin must be used. https://www.jotform.com/help/324-A-Guide-to-Embed-Forms-for-WordPress-Users

    Let us know if you have any further questions.

    Thank you!


  • jayhobbs21
    Replied on December 11, 2017 at 2:20 PM

    I added the plugin, and it added the form...super simple....but there is no code to edit, except for  the jotform id.

    Awwww, so, do I understand correctly, accessing and using the source code for my WP site is not possible?

    So back to the clear page question: Nik_C said "This could work only if a user is redirected to a new page (the page he didn't visit), then the counter will just continue with increment. 

    On the other hand, if you want to use the same pages and clear just the filled data"

    What if we forget the COUNTER for a moment.  Is there a way "use the same pages and clear"  all the data so that I can re-use a page by redirecting back to it?

  • Kevin Support Team Lead
    Replied on December 11, 2017 at 3:12 PM

    Awwww, so, do I understand correctly, accessing and using the source code for my WP site is not possible?

    This will depend on the WordPress version that you're using, here are some links that may also help you posting the source code on your webpage: 

    https://en.support.wordpress.com/code/posting-source-code/

    https://en.support.wordpress.com/code/

    https://wpbuffs.com/how-to-edit-source-code-in-wordpress/

    What if we forget the COUNTER for a moment.  Is there a way "use the same pages and clear"  all the data so that I can re-use a page by redirecting back to it?

    As far as I know, and as per my tests, it's not possible to clear up the values for one page only, you can clear the fields for the entire form (but this before submitting the form) and adding the reset button is required: 

    Is it possible to clear a form page yet preserve a score and another value while repeated a page? Image 10

    You may also use the form's link as thank you page and redirect the user to the same form after the submission so he has a clear new form. 

    This guide will help you changing the form's link: https://www.jotform.com/help/38-Redirecting-Users-to-a-Different-Page 

    I hope this helps. 

  • jayhobbs21
    Replied on December 11, 2017 at 5:18 PM

    Thanks for the links.  I'm trying to get some of the terminology straight so I know what to apply.

    My site is hosted on DreamHost, so I guess that means "self-hosted", sort of.  It's not on my computer, but it is not hosted by WordPress.

     - Is that just a way to FORMAT the appearance of the code, or does it let you actually run the code on my  site?

         - https://en.support.wordpress.com/code/posting-source-code/

    Since I am self-hosted (I think), this does not apply, right?

         - https://en.support.wordpress.com/code/

    I assume this is directions of where to add the extra css for the page/site that I download form JotForm?  It suggests that I can just add the JotForm downloaded code in the TEXT tab of the EDIT PAGE in WP.  I COULD add through the FileZilla if necessary.

         - https://wpbuffs.com/how-to-edit-source-code-in-wordpress/

  • Kevin Support Team Lead
    Replied on December 11, 2017 at 6:34 PM

    Since your last question is related to a different matter, I've moved it to another thread in order to assist you better and avoid confusion (due to the fact that this thread is a bit long too). We will help you as soon as possible here: https://www.jotform.com/answers/1320280 

    Thanks.