Limiting selections in a dropdown

By: Liam Caulfield | Asked: 04/01/2024
ForumsCategory: How-toLimiting selections in a dropdown
Liam Caulfield asked 3 weeks 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 3 weeks ago
I imagine you could do it with the frm_validate_field_entry hook, using this example.
Liam Caulfield answered 3 weeks 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 3 weeks ago

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

Liam Caulfield answered 3 weeks ago

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