I am having some problems when I want to add custom jQuery code that affects the form.
For example when someone clicks an input or radio button another input or element to be hidden or shown.I tried to get a result like console.log('trigger');
when clicked or something else but nothing in dev. console appeared.Also, I tried the following methods:
To call the click
event with .on('click', function()...
or to call the event with .trigger('click');
, or to change the event to change
To embed the script within a file from ninja forms or to put it inside the page at the ending of body
tag in footer.php
To change the opening declaration of jQuery to work inside a function like this : (function($) {$(document).ready(function(){.....
I know that I could try another plugin, I tried one and the custom jQuery works but I really like this one and don't know why this is happening ...
Thanks
But often when users find Ninja Forms emails not sending, what's happening behind the scenes is that emails are rejected by a mail server on their way to your mailbox. WordPress uses the wp_mail() function, which can't authenticate emails. That's why servers silently reject them as spam.
However, if you want to make changes to the individual form, navigate to your Ninja Forms Dashboard and select the form you wish to make the font customizations. Select the specific form field and open the Style settings > Label Styles > Font Size. Here, you can also change the color of the text, and more.
Navigate to Ninja Forms > Settings > Advanced Settings and look for the section titled reCaptcha Settings. This is where you will paste in the key and secret you copied to your clipboard in step one. Add the ReCaptcha v3 Site Key and reCaptcha v3 Secret Key credentials to their corresponding fields.
Not sure if you need help with this any more as it's been some time since you posted your question, but this may help others in the future. I had the same/similar issue with not being able to run JS/jQuery on the Ninja Forms and found that it's because Ninja Forms load their forms asynchronously. So, when your document.ready function runs, the form doesn't yet exist and it's not able to bind.
Ninja Forms have their own event ready state that can be used as follows:
jQuery(document).on( 'nfFormReady', function( e, layoutView ) {
// Your code goes here...
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With