• Resolved frenchlessons

    (@frenchlessons)


    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

    (@codepeople)

    Hello @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

    (@frenchlessons)

    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

    (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

    (@codepeople)

    Hello @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:

    <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

    (@frenchlessons)

    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

    (@frenchlessons)

    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

    Plugin Author codepeople

    (@codepeople)

    Hello @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:

    #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:

    <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. We will happily answer this and any other questions you can have on our own site.

    Thank you.

    Thread Starter frenchlessons

    (@frenchlessons)

    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.