reactive pages

  • beheliod
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0

beheliod replied the topic: reactive pages

Bonjour
Je reviens vers vous après un weekend et quelques heures de sommeil pensant avoir les idées plus au clair. Pourtant je ne m'en sorts pas et je ne sais pas si je suis dans la bonne direction.
Je suis donc allée dans la gestion des scripts
J'ai dépublié le script natif ff_validate_page et je l'ai dupliquer pour éviter de "casser" le script natif
Je travaille donc sur la copie que j'ai activé.
Il me semble, Eddy, que dans le script que tu partages il n'y a pas beaucoup de choses à modifier... depuis mon très faible niveau de connaissance en codage.

J'ai donc saisit le code ci-dessous, je valide, je teste et rien ne fonctionne.
J'ai essayé plusieurs syntaxes qui pouvaient me sembler cohérente mais rien n'y a fait.
Merci beaucoup.
Olivier
function ff_suivant_action (element, action) // Next is the name of bouton
{
 if (typeof bfUseErrorAlerts! = 'undefined') {
     JQuery (". BfErrorMessage"). Html ('');
     JQuery (". BfErrorMessage"). Css ("display", "none");
    }
    error = ff_validation (ff_currentpage);
    si (erreur! = '') {
        if (typeof bfUseErrorAlerts == 'undefined') {
           alerte (erreur);
        } autre {
           bfShowErrors (error);
        }
        ff_validationFocus ('');
    } autre
    switch (JQuery ('[q0= "ff_nm_choix []"]: coché'). val ()) {
        cas 'q0a':
ff_switchpage (2);
            Pause;
        cas 'q0c':
ff_switchpage (7);
Pause;
        défaut:
ff_switchpage (8); // dernière page
Pause;
    } // commutateur
} // ff_suivant_action
#235402
  • Posts: 109
  • Karma: 1
  • Thank you received: 10

Eddy.vh replied the topic: reactive pages

Olivier,

Tu n'as pas bien suivi mes instructions, il n'y a aucun script à modifier ou à dupliquer dans ceux qui sont disponibles dans ton composant.

Je t'ai envoyé un formulaire, au format xml, que tu peux installer sur ta configuration en suivant ce tutoriel , partie "Comment installer un package ?"

Une fois installé, tu l'ouvres et tu le scrute dans les options avancées des boutons personnalisés que j'ai placés.
#235435
The following user(s) said Thank You: mihaela
  • Posts: 2109
  • Karma: 72
  • Thank you received: 267

mihaela replied the topic: reactive pages

Hello again,

As Eddy wrote, there is no need to do any changes to ff_validate_page script.

You need to follow these steps:

1) Go to your form's Properties and set Paging include to No. That will remove all next and back buttons.

2) Create a custom next button. Create new element of Submit button type. What you write in Value field for that button element is what will be displayed on that button in your form, so that it the place where you should put, for example, "NEXT".

3) Go to Advanced properties of that next button element and in Actionscript section set Type to Library and mark Click as Action.
In the code are below put the code similar to this:
function ff_NextButtonName_action(element, action) 
{
 if(typeof bfUseErrorAlerts != 'undefined'){
     JQuery(".bfErrorMessage").html('');
     JQuery(".bfErrorMessage").css("display","none");
    }
    error = ff_validation(ff_currentpage);
    if (error != '') {
        if(typeof bfUseErrorAlerts == 'undefined'){
           alert(error);
        } else {
           bfShowErrors(error);
        }
        ff_validationFocus('');
    } else
    switch ( JQuery('[name="ff_nm_radiogroupname[]"]:checked').val() ) {
        case 'A':
ff_switchpage(2);
            break;
        case 'B':
ff_switchpage(3);
break;
        default:
ff_switchpage(4); //dernière page
break;
    } // switch
} // ff_NextButtonName_action
NOTE: You need to replace NextButtonName with the name of that custom submit next button that you have created.
Also, you need to replace radiogroupname with the Name of the radio group depending on which the page is defined.

"A" and "B" have to be replaced with possible choices in that radio group element.

Let me know whether that makes the situation clearer and whether you have managed to apply this to your form.

Regards,

Mihaela
#235465
Moderators: ForumSupporttomeperica
Time to create page: 0.060 seconds

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99€

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here