Conditional logic on dropdown not working with data from hidden field that is populated via jQuery

By: John Goss-Smith | Asked: 04/02/2024
ForumsCategory: Code HelpConditional logic on dropdown not working with data from hidden field that is populated via jQuery
John Goss-Smith asked 9 months ago
Hi, Using this snippet linked from an older post in this forum https://formidable-masterminds.com/display-day-name-on-date-field-change/
I have now got a hidden field which is populated with the day of the week based on the date selected in the datepicker. But I cannot get it to work with conditional logic based on what is in the hidden field, e.g Monday, Tuesday, Wednesday... I have seven dropdowns, one for each day of the week each with unique values in and want them to display/hide depending on the day, but it seems the conditional logic is not seeing or getting the value from the hidden field. The day value is there in the hidden field as when I unhide it I can see it. It works if I unhide the hidden field and then manually type in the day, but when its populated dynamically via the jQuery its not working, am I missing something to tell the form that the hidden field is now populated that allows it to fire the conditional logic?

Many thanks John
Attachments
1 Answers
Best Answer
Victor Font answered 9 months ago
The code you are referencing is mine. It is jQuery. You are using conditional logic in the form builder. You aren't going to get form builder conditional logic to work with custom jQuery functions. If you're going to use jQuery, use it for the conditional logic as well.
John Goss-Smith replied 9 months ago

Thank you Victor, all sorted now and went down another path with the kind assistance of support. The conditional logic worked fine, it was the lack of Formidable seeing that the field had been updated was more the issue. But we used a different Formidable Pro native solution in the end.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right