I have a simple custom post type set up for Events. I'm using Carbon Fields to add a Start Date field which I would like to include in the post_name. For example:
http://example.com/events/20190401-staff-meeting/
I'd like to have the post_name created when they save the event, adding the custom field "cw_event_start_date" to the post_name to prevent the URLs from looking like this:
http://example.com/events/staff-meeting/
http://example.com/events/staff-meeting-2/
http://example.com/events/staff-meeting-3/
We won't have to worry about duplicate events on the same date, and if they did it should create the post_name as "20180401-staff-meeting-2".