Gravity form submits, custom post not created
-
I am working on a site and the goal is for users to complete a form, then I would like to have the submitted data stored in the database. The website admin should also be able to create these posts themselves as they will be listed on the website.
To achieve this I have been following this guide:
Create custom post type from form submission.I have set up a custom post through custom post UI. Then I wrote out the meta boxes for that post.
I am using this:
add_action("gform_after_submission_1", "create_booking_from_submission", 10, 2);The form is submitte,d the actual code runs as well, as I can see update_post_meta running. I got an error for some of the unsupplied fields. For example, this is a checkbox and in ‘Undefined offset’ errors when not checked. This should be okay though as I expect it to inser NULL into the database at this point.
update_post_meta($bookingId, $bookingPrefix.'private', ucwords($entry[14]));However, I don’t see any posts being created and I am at a loss on how to troubleshoot this. I might be overlooking something. Any help would be greatly appreciated.
The topic ‘Gravity form submits, custom post not created’ is closed to new replies.