Limiting selections in a dropdown

By: Liam Caulfield | Asked: 04/01/2024
ForumsCategory: How-toLimiting selections in a dropdown
Liam Caulfield asked 4 months ago
Hi, I have a dropdown menu that is populated from Lookup data. I want to restrict the number of selections a user can make, for example selecting only 5 countries from a list. I can't see how to do this anywhere, is it possible?
3 Answers
Rob LeVineRob LeVine answered 4 months ago
I imagine you could do it with the frm_validate_field_entry hook, using this example.
Liam Caulfield answered 4 months ago
Hi, thanks but that looks like it's for checkboxes and was designed for a minimum number not a maximum.
Rob LeVineRob LeVine replied 4 months ago

That's why I said "example". Tailor it to your field and requirements.

Liam Caulfield answered 4 months ago
Nice.

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