No-Duplicate combinations of dropdown fields in repeat group

automill

Member
I am trying to validate the No-Duplicate (unique) combination of two dbjoin dropdown fields (Room Type and Room Category) using JavaScript that are in repeat group:

Room Type
0 - Please select
1- Single Room
2- Double Room
3- Family Room
4- Tent Room

Room Category
0 - Please select
1- Standard
2- Deluxe
3- Premium
4- Luxury

So, I just want, for example, if a Single Room with standard is already selected, then this combination should not be selected again in next repeat. For this, an alart trigger will be suffice and should reset the both selected fields value to 0 on alert ok submit.

However, various options in JavaScript are available like no repeat of same selection but I did not find any example for combination validation. The php/ajax validation also does not fit in this case as the same data of earlier dates is available in database on the same id.

Thanks
 
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top