Lookup field unique is not Working!

By: Abid Muhammed | Asked: 12/19/2022
ForumsCategory: How-toLookup field unique is not Working!
Abid MuhammedAbid Muhammed asked 1 year ago

Hi,  I have created a Coupon code field using the lookup field, and it is working fine, Now I have the following requirements-

  • The coupon code which is entered should be valid only for one time, That is once a user applied for one coupon it should be deactivated, or delete from entries. ( I have a limited count of coupon codes around 30). I tried with unique option for that field but it's not working!
  • If the user entered the wrong coupon code, I want to show an error message just below the field after the focus is released from the field.(Validation)

How can I achieve these requirements, Thanks

1 Answers
Victor Font answered 1 year ago
You said you're using a lookup field for the coupons. How can a use enter a wrong value when picking from a dropdown of values you provide? To remove used options, see this example: https://formidableforms.com/knowledgebase/frm_setup_new_fields_vars/#kb-remove-used-options.
Abid MuhammedAbid Muhammed replied 1 year ago

Thank You Victor for the help

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