I’m trying to upload images on a post creation with ProForm. The image is uploaded in the medias folder, but is not ‘linked’ to my new post. In my CPT i’m using Metabox ‘image’ custom field types (image, image_advanced, single_image or image_upload). When saving a post in database, Metabox uses the image post_ID as the meta value. Pro form set the image URL as the value.
The better way to go here is to let Bricksforge first create the post, THEN update the post meta of the new created post. For this, I’ve added a new “Post Meta Action” to your form. There, I set the Post ID to {{live_post_id}} . This means that the new created ID of the previous action should be used.
Can you, please, show me an exemple of your ProForm parameters for the update meta action, because i can’t get it work? I don’t anderstand how to get the image ID instead of url on the update meta action…
I tested with and without upload from create post action, same result. No meta value inserted in the database. Strange behaviour. I mean, when i set the image upload in the create post action with no meta update action, bricksforge inserts a row in the database with the right field key but image url as the value.Oddly, when i set the meta update action (with or without image upload on create action), bricksforge doesn’t insert any meta field row in database…
Just took a closer look and found the problem. It was caused by the fact that in your website, Metabox AND JetEngine as well is installed. I do some plugin checks to know which image format Pro Forms should use to save the values. JetEngine is needing urls, while Metabox needs IDs. In your case, Pro Forms choosed the JetEngine way.
I’ve updated the conditions now to be more strict and work also when both plugins are installed on a site. Should work now