0

I have a simple site with two Gravity Forms, both of which allow users to upload media.

I'm looking for some simple code that:

(a) inserts all uploaded media into the Media Library and not the default Gravity Forms folder (b) attaches media to pages. Form 1 attach to page 1, form 2 to page 2.

I've found a few similar posts, but nothing simple that does exactly what I need.

I guess I'd use something like

add_action( 'gform_after_submission_1', 'after_submission', 10, 2 );

and

wp_insert_attachment

Because I only have two forms, would something simple in the functions.php that adds media to the library then depending on which form was used attaches to posts work?

0

My plugin Gravity Forms Media Library provides this functionality for Gravity Forms: https://gravitywiz.com/documentation/gravity-forms-media-library/

  • Sidenote.... that is a premium plugin, i.e. it is not free. Amazing features though. – Craig Wayne Aug 20 '18 at 0:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.