Automatically increment a Field

By: Bobby Singh | Asked: 01/22/2024
ForumsCategory: How-toAutomatically increment a Field
Bobby Singh asked 5 months ago
Hello, Is there a way to Automatically increment a field on the form? Example: I have a booking form for a hotel. I have a repeatable section that allows a max of 4 people per room. After 4 people they need to add another room. Can I Automatically increment the rooms on the form to show Room 1, Room 2, Room 3 every time they click the ADD Room button in the repeatable section?  Screenshot of section of form attached.
1 Answers
Rob LeVineRob LeVine answered 5 months ago
I imagine it'd be moderately easy to accomplish your goal using jQuery. See this example for doing things when a new repeater row is added (or removed).

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