Meta Box
Support › Meta Box AIO › Set Field Value Upon Post Creation
Hey,
Can you show me the php to use to set a field's value based on another fields value when a new custom post is created/updated?
eg:
date_field = datepicker number of days field = number calculated date field = date field + number of days field.
Thanks
Hi,
You can follow this documentation to know how to add a callback function to update a field value to an MB hook https://docs.metabox.io/actions/rwmb-after-save-field/
and refer to this topic to add a number of days to date https://stackoverflow.com/questions/2332681/add-number-of-days-to-a-date