1. NOTICE: If you are using Fabrik and update to Joomla 3.10, you will need to update to Fabrik 3.10. And, if you are using Fabrik, do not upgrade to Joomla 4, we do not have a supported version ready for release. More information on a release date coming soon. Also, please note that Fabrik 3.10 will not install on any Joomla sites less than 3.8.
    Dismiss Notice

Triggering actions from a custom button element

Discussion in 'Standard Support' started by smalldragoon, Mar 13, 2020.

  1. smalldragoon

    smalldragoon Member

    Level: Community
    HI,
    I searched through the forum and I don't think a similar requirement. Do not hesitate to point me to an existing post if I did not searched well enough ;-).

    So, I need the following :

    a form is displayed ( few fields , whatever they are ) .
    to validate the form, I need to trigger an external "step-up" page.

    From my understanding of Fabrik, I can disable all the "standard button", add a "button element" which will trigger a javascript.

    Having that said, how can I have the following behavior :

    1 - user fill in form
    2 - user click on "submit custom button"
    3 - Step up is executed. If result is ok, form data are saved. If result is NOT ok, data are of course not saved. -> IS THIS POSSIBLE ?

    Other options : My step-up mechanism manage in "real time" user groups belonging. So maybe check if user belongs to a group and if he is , just save the form, if not, trigger the step up.

    I'm open to any suggestion here of course ( these ones or any other )

    Thanks for your insights !
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    What is the "step up" doing? Is it an other Fabrik form?

    In principle you can validate a form with a php plugin (where you can also check the user group), you can redirect the form on submit to an other form, you can validate stuff with a php plugin on form load etc.
     
    smalldragoon likes this.
  3. smalldragoon

    smalldragoon Member

    Level: Community
    hi, step-up is not a Fabrik form .
    it is an html/javascript page.
    In short : javascript will perform an external authentication and send back a yes/no answer.
    based on this, I want to submit or not the form
     
  4. smalldragoon

    smalldragoon Member

    Level: Community
    after few tests, I can simplify the question : How can I submit a form thanks to element buton ( with javascript )
    Thanks !
     

Share This Page