I have a Gravity form. The problem is Jquery not working immediately.
I create a jquery function to modify a element of form, and when jquery modify a element’s value is 1, the form will use conditional logic and show somethings, but it’s not working immediately. Util I click on some elements using conditional logic of gravity and turn back it will work.
Please advise me a solution for this error.
If you are modifying input values via jQuery, you may need to also trigger a change on event on the element. I’m not sure if this is the issue, but I think I encountered something similar before and adding the following to the specific input did the trick. Worth a try.
$('.gfield').trigger('change');
You’d probably want to replace .gfield
with a more explicit selector.
Thank you for helping me. But in my code have .trigger(‘change’); already. I make sure "something similar before and adding the following to the specific input did the trick. " but it’s not working yet.
Additional in my localhost, Gravity form very well. But in dev environment it’s not working.
- localhost WordPress 5.1.1, Gravity Version 2.2.5.20.
- Dev WordPress 5.0.4, Gravity Version 2.4.8.
Please give me an advise, I am stacking on it.