conditional field

By: sonya pe | Asked: 02/14/2025
ForumsCategory: General questionsconditional field
sonya pe asked 1 week ago

([10]==[11]) ? (0) : (1)

have the formula above and it doens't matter it always shows 0 what I'm doing wrong, I try to check if content of field 10 and 11 has the same content I like to have 0 otherwise 1, my fields content are text

sonya pe replied 1 week ago

thanks for your answer, but are using other solution whne you need to check fields, I need to disable the form submission if someone fields first and last name the same, it is so incredible that like simple thinks like that I can't do it with formidable.

Rob LeVineRob LeVine Staff replied 1 week ago

While it involves custom code, you can create a hidden field, add a couple of lines of jQuery that compares the two text fields and puts a 1 or 0 (or Y/N, or whatever) in that hidden field and then you can enable/disable the submit button based on the value of the hidden field.

Rob LeVineRob LeVine Staff replied 1 week ago

For anyone seeing this message in the future, my answer that Sonya refers to has somehow disappeared. It was that "Conditional calculations only work in numeric calculations and can not be used to compare text fields." from the documentation https://formidableforms.com/knowledgebase/field-calculations/conditional-calculations/

sonya pe replied 1 week ago

thanks again, it is exactly what I'm trying to avoid add more stuff and code on my website, plugin already is some extra to load on pages, should be a simple formula or at least for the pay version have the option built. If I need to start to add script for each single form I will may go back to the option to code the forms and will be less to load, starting to have so many other issues, already need to style my forms because the styles on the plugin is not enough

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