post submission form
-
Can this use to create a post submission form for logged in users. It would allow them to upload both images and files for reviews or game mods.
-
I hope you are doing well.
Yes, you can use it
By default it will set the post to the user that is logged in:
https://monosnap.com/file/nboIqDLfuQqGsafCkvE4zoW98na1NN
Best Regards
Patrick Freitas1.Yes, but can they also upload both multiple files and multiple images too?
2.Is there anyway to move the post into some kind of queue for review before setting it to public view.
1.Yes, but can they also upload both multiple files and multiple images too?
The “post data” field only allows you to add/upload featured image to the post. But you can add upload type field to the same form and you can set it to allow multiple file uploads.
Such images will not be directly/automatically added to post but they will be within the same submission (“Formiantor -> Submissions”) or you can do it in a bit different way:
– at multiple upload fields to form – each of them set to “single” upload
– and then map these fields to post custom fields, as described here:https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#custom-fields
and those files will there be added to custom fields of the post.
2.Is there anyway to move the post into some kind of queue for review before setting it to public view.
They don’t have to be published right away. See the “Default status” option here
https://monosnap.com/file/nboIqDLfuQqGsafCkvE4zoW98na1NN
You can set it as “pending review” or “Draft” and it will not be published automatically until manually published by you/editors
Best regards,
AdamGreat!. Is there anyway to specify what folders the images or files will go?
Hi @infernoprime,
I hope you are doing well today!
You can use the below code snippet as mu-plugin and customize your upload directory.
https://gist.github.com/wpmudev-sls/46d776223d9d54c732fd409b2e78c8a9More information could be found below on how to use mu-plugins.
https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-pluginsKind regards,
ZaferWhat about outside wp-content?
We don’t suggest saving any data outside wp-content, but you would just need to modify lines 78 & 79.
Best Regards
Patrick FreitasOf what file?
Patrick is saying to modify lines 78 & 79 in the mu-plugin code he linked to change the directory:
https://gist.github.com/wpmudev-sls/46d776223d9d54c732fd409b2e78c8a9$param['path'] = WP_CONTENT_DIR . $this->path_part; $param['url'] = WP_CONTENT_URL . $this->path_part;What code would I need to specify the new directory?
I believe you’d change line 28 from
/forminator/to the path within/wp-content/you’d like to point to.
private $path_part = '/forminator/';$path_partis later used on line 78 & 79 mentioned above to point to a folder withinwp-content:$param['path'] = WP_CONTENT_DIR . $this->path_part; $param['url'] = WP_CONTENT_URL . $this->path_part;You can edit this path to your liking.
Hello @infernoprime ,
We haven’t heard from you for several days now, so it looks like you don’t have any more questions for us.
Feel free to re-open this ticket if needed.
Kind regards
Kasia@aakash8 Is there anyway to be able to upload outside of wp-content?
Hi @infernoprime,
You should be able to upload the files outside the wp-content by changing the following variable from line no. 78 & 79
$param['path'] = WP_CONTENT_DIR . $this->path_part; $param['url'] = WP_CONTENT_URL . $this->path_part;Please note that changing the default path and URL is not recommended.
Kind Regards,
Nebu John-
This reply was modified 3 years, 10 months ago by
Nebu John - WPMU DEV Support.
Would you mind explaining how or what the path code I would need?
-
This reply was modified 3 years, 10 months ago by
The topic ‘post submission form’ is closed to new replies.