Reduce Number Field by amount in another form

By: Enrico Spada | Asked: 03/26/2024
ForumsCategory: Code HelpReduce Number Field by amount in another form
Enrico Spada asked 4 weeks ago

I am trying to use the frm_after_update_entry to update a field in a data form after a public form is submitted (for reducing the number of tickets available to a specific performance.

The documentation linked above includes examples that deal with user ids and such, and I can't figure out how to simplify it to just update a form field. Context:

  • I have a Data form that has my events -- each event has a title and a number of available tickets
  • I have a separate Registration form that uses Lookup fields to populate a dropdown with those events. There is a repeater that collects info on each attendee being registered.
  • I have additional fields to total the number of repeaters, and then subtract that number from the available tickets--resulting in hidden fields that shows the Updated Total.
  • I would like to update the Number of available tickets on the Data form with this Updated Total.
  • (Presumably the next time someone loads the registration form, it will show them a new, reduced number of available tickets and the cycle can continue until the availability reaches 0)

Hope this is helpful

1 Answers
Rob LeVineRob LeVine answered 4 weeks ago
The example "Automatically update a field in another form" does what you describe. Can you explain why that isn't a good basis for what you need to do?

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