Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // http://www.gravityhelp.com/forums/topic/display-featured-image-selection-based-on-conditional-logic#post-161066
- // change the 98 here to your form ID
- add_action('gform_after_submission_98', 'set_featured_image', 10, 2);
- function set_featured_image($entry, $form){
- // change $entry['2'] to the field where the radio button
- // image was selected mine was field 2. The value of that
- // radio button should be the attachment ID
- set_post_thumbnail($entry['post_id'], $entry['2'];);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement