• New Commercial Services Section

    We have now opened a commercial services section here on the forum. If you have a Fabrik project that you wish to have someone work on for you, post it under Help Wanted. If you are an application developer and wish to earn some money helping others, post your details under Fabrik Application Developers.

    Both of these are unmoderated. It will be up to both parties to work out the details and come to an agreement.

Change CSS of a page element upon form submit

Hello everybody,

I've added a Fabrik form inside an article (with the help of Fabrik content plugin) and I would like to change the css of another element of the same page (not an element of the Fabrik form) when form is submitted.
I would like to change the state of a link from disabled to enabled (I'm using a Bootstrap 4 template).

For now I'm using the fact that a new parameter 'isMambot=1' is added in the url after the form is redirected to the same page.
And the following script:
Code:
    jQuery(function($) {
       $(document).ready(function() {
           if (window.location.href.indexOf("isMambot") > -1) {       
              $('.outbound-link').each(function() {
                 $(this).removeClass('disabled');
               });
           }
       });
   });

I'm not sure this the right way and would like to know what do you think?

Thank you
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top