• Resolved MaybeYesMaybeNo

    (@maybeyesmaybeno)


    I’d like to add a css class to .forminator-button buttons. I believe there is no hook to do so, therefore would add the class with JS. What is the proper function to add the class after the ajax form is fully loaded? I had read about a forminatorPostRender function, but that doesn’t seem to work or is obsolete

    jQuery(document).on(‘forminatorPostRender’, function(event, $form) {
    // Code to execute after the form is loaded via AJAX
    console.log(‘Forminator form loaded via AJAX:’, $form);
    // Add your custom code here
    });

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @maybeyesmaybeno,

    Are you referring to the submit button? If yes, you could add the class within the existing plugin feature.

    Screenshot at 16:07:29.png

    Screenshot at 16:08:23.png

    Could you please check and see whether the above fits your requirements?

    Looking forward to your resposne.

    Kind Regards,

    Nithin

    Thread Starter MaybeYesMaybeNo

    (@maybeyesmaybeno)

    Thank you for your response. I wanted to apply a class to all .forminator-button which also include the pagination buttons. I solved this via jquery for now. If there is a more elegant solution, please let me know. I’m looking for a global solution, without the need of adding classes to individual fields (also pagination fields don’t have the option to add custom classes)

    $( document ).on( “ajaxComplete”, function() {

    $(“.forminator-button”).addClass(“myclass”);

    });

    Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @maybeyesmaybeno,

    I am glad that you managed to find a workaround, the solution appears to be straightforward and neat.

    I am marking this ticket as resolved. Please feel free to open a new ticket if you need any further assistance, we are happy to help.

    Kind Regards,
    Nebu John

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add css class to forminator buttons’ is closed to new replies.