I have a custom post type called ‘submissions’ where it has the following fields:
Custom Field: user_id
Custom Field: teacher
Custom Field: sorness
As it is, the form is setup to show only the soreness input field where ‘user_id’ and ‘teacher’ custom fields are hidden, however, I would like to populate these (user_id, teacher) with current data from the logged in user.
The custom field ‘user_id’ would be $current_user->ID and teacher would be another stored variable.
I assume this would be set inside ‘new_post’ array? Can somebody please help?