Validation to prevent duplicate selection in dropdown fields.

cmwincom 04 Jul, 2025

I have 4 dropdown fields that are using dynamic options. It is possible that 2 or more of the dropdowns may contain the same values as a selection option. I would like to setup validation so there is no duplication of a value amongst the four fields when the form is submitted.. 

Max_admin 09 Jul, 2025
Answer

For this you will need to use Custom Validation function:

https://www.chronoengine.com/faqs/chronoforms/chronoforms8/how-to-use-custom-javascript-or-php-validation-in-your-form

You may get the values of other fields in PHP using 

$this->data("field_name")

and in JavaScript function using 

document.querySelector("[name='field_name']").value
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.