Support

Account

Home Forums General Issues Calculate numeric field according to other field's values

Unread

Calculate numeric field according to other field's values

  • Hello.

    I have two custom post types, Training Courses and Trainees. Training Courses have a Trainee Relationship custom field that is filtered automatically by the Trainee custom post type, a numeric custom field named Total number of spaces that holds the number of maximum spaces that can exist in the training course and a numeric custom field named Spaces available that holds the number of available spaces in the training course. I am looking for a way to be able to have the last field, Spaces available, automatically calculated by subtracting the number of trainees being selected from the Trainee Relationship custom field, from the total number of available spaces while adding/editing a training course. Is that possible?

    I currently want this for a backend system so I won’t be displaying anything on the frontend.

    Using Advanced Custom Fields 5.7.7

Viewing 1 post (of 1 total)

The topic ‘Calculate numeric field according to other field's values’ is closed to new replies.