Hello,
Is there anyway I can use gravity forms to have clients upload files to current post?
Thank you in advance
Hello,
Is there anyway I can use gravity forms to have clients upload files to current post?
Thank you in advance
You can do this. When you embed the Gravity Form in a page or post, you will have access to the post ID. You will need that to attach files to the post. You can use the gform_after_submission hook to update an existing post: http://www.gravityhelp.com/documentation/page/Gform_after_submission
In the first example on this page http://www.gravityhelp.com/documentation/page/Gform_after_submission#Examples you can see how to update a post. On line 06 though, you will need to get_post for the post the form is embedded in, not the post which was just created.
Then, you can use the WordPress function wp_insert_attachment:
http://codex.wordpress.org/Function_Reference/wp_insert_attachment
Let us know if you need more pointers.
Thank you, and merry christmas!
Thank you. Let us know if you need more help.