Title: Conditional multi page
Last modified: March 28, 2023

---

# Conditional multi page

 *  Resolved [frenchlessons](https://wordpress.org/support/users/frenchlessons/)
 * (@frenchlessons)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/conditional-multi-page/)
 * Hi!
 * I am creating a quiz using your plugin, with several page breaks. The quiz can
   be rather long, and if the user is failing on the first page, there’s no point
   for them to continue as the difficulty increases.
 * I was hoping to create a condition for the next pages not to show up in this 
   case and to directly show the result, but there’s no option available in the “
   Page Break” section.
 * Do you have any ideas on how I could achieve this?
 * Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/conditional-multi-page/#post-16601696)
 * Hello [@frenchlessons](https://wordpress.org/support/users/frenchlessons/)
 * In the current plugin version, the “Next page” buttons validate the values of
   the current page before moving forward. We implemented the plugin in that way
   because more users felt frustrated at reaching the last page to know that must
   move pages backward to fix or enter values that must be filled or corrected on
   the corresponding page.
 * However, you can jump to a specific page by code or by pressing a button field.
 * Keeps in mind that pages’ indices begin in zero. So, if you want to jump to the
   third page, you can execute the code below from the onclick event of a button,
   an equation, or any other piece of code:
 * `GOTOPAGE( 2 );`
 * Best regards.
 *  Thread Starter [frenchlessons](https://wordpress.org/support/users/frenchlessons/)
 * (@frenchlessons)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/conditional-multi-page/#post-16601916)
 * Thanks! I knew there had to be a way to do this.
 * I’ve tried to create a button with a calculated field below it, but it isn’t 
   working and I’m not too sure why. I think I may have misconfigured the button,
   but I’m unsure of what to do to so that the button is in a “1” state when the
   user presses it. Here’s my code
 *     ```wp-block-code
       (function() {
   
       var bouton_next_0 = fieldname291;
   
       var pourcentage_A0 = fieldname23;
   
       if (AND(bouton_next_0 == "1", pourcentage_A0 > 60)) {
   
       GOTOPAGE( 1 );
   
       }
   
       else if (AND(bouton_next_0 == "1", pourcentage_A0 < 60)) {
   
       GOTOPAGE( 5 );
   
       }
   
       }
   
       );
       ```
   
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/conditional-multi-page/#post-16601987)
 * Hello [@frenchlessons](https://wordpress.org/support/users/frenchlessons/)
 * Buttons are not calculated fields. You cannot insert equations directly in the
   buttons, and you cannot access the fields values by their names as you do with
   the equations from buttons.
 * You can insert an “HTML Content” field in the form to define a function through
   its content:
 *     ```wp-block-code
       <script>
       function your_function() {
           var bouton_next_0 = getField('fieldname291').val(false, true);
           var pourcentage_A0 = getField('fieldname23').val(false, true);
   
           if (AND(bouton_next_0 == 1, pourcentage_A0 > 60)) {
               GOTOPAGE(1);
           } else if (AND(bouton_next_0 == 1, pourcentage_A0 < 60)) {
               GOTOPAGE(5);
           }
       }
       </script>
       ```
   
 * And then, call the function from button onclick event: `your_function();`
 * Best regards.
 *  Thread Starter [frenchlessons](https://wordpress.org/support/users/frenchlessons/)
 * (@frenchlessons)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/conditional-multi-page/#post-16602145)
 * Thanks, that works.
 * One last question. Since I’m bypassing the way the plugin is supposed to work,
   is there any way to hide the “previous” and “next” buttons without resorting 
   to CSS?
 *  Thread Starter [frenchlessons](https://wordpress.org/support/users/frenchlessons/)
 * (@frenchlessons)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/conditional-multi-page/#post-16602206)
 * Oh, and that’s completely out of topic but I’m also trying to get the “%” on 
   the same line and I’ve been trying multiple things with chart.js but nothing 
   really worked. Any idea?
 * > [View post on imgur.com](https://imgur.com/a/NryqOOu)
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/conditional-multi-page/#post-16602261)
 * Hello [@frenchlessons](https://wordpress.org/support/users/frenchlessons/)
 * To hide next page and previous pages buttons, you have two alternatives. You 
   can use CSS or JS.
 * You can enter the style definition below through the “Customize Form Design” 
   attribute in the “Form Settings” tab:
 *     ```wp-block-code
       #fbuilder .pbNext,
       #fbuilder .pbPrevious{display: none !important;}
       ```
   
 * Or you can insert an “HTML Content” field in the form with the following piece
   of code as its content:
 *     ```wp-block-code
       <script>
       fbuilderjQuery(document).one('showHideDepEvent', function(){
       fbuilderjQuery('.pbNext,.pbPrevious').remove();
       });
       </script>
       ```
   
 * About CFFCHART operation, it is a commercial feature and we are not allowed to
   support any customers in these forums.
 * For pro or commercial product support please contact us directly on our site.
   This includes any pre-sales topics as well.
 * Commercial products are [not supported in these forums](https://wordpress.org/support/guidelines/#do-not-post-about-commercial-products).
   We will happily answer this and any other questions you can have [on our own site](https://cff.dwbooster.com/contact-us).
 * Thank you.
 *  Thread Starter [frenchlessons](https://wordpress.org/support/users/frenchlessons/)
 * (@frenchlessons)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/conditional-multi-page/#post-16611387)
 * Got it, thank you very much for everything.
 * I have the platinum version so I’ll send you a message later on your site.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Conditional multi page’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [frenchlessons](https://wordpress.org/support/users/frenchlessons/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/conditional-multi-page/#post-16611387)
 * Status: resolved