You can create a drop down in your form which lists all the post formats you want the visitor to be able to select. Then, with a function linked to gform_after_submission, you can update the post format to the one selected by your visitor. Code something like this: http://pastebin.com/dYiQJqmY
Be sure to get the name and case of the format exactly correct. The built-in WordPress post format is 'video' but your theme may use something different. You can use a label of Video and a value of video if that looks better to you. If you have only a few options, you can use radio buttons instead.
UPDATE: this code was previously posted by David Smith, which should work as well (however, you will need to change gform_post_submission to gform_after_submission in this code, since that old hook was deprecated: http://www.gravityhelp.com/forums/topic/auto-select-post-format#post-30916 )
Posted 11 years ago on Sunday March 24, 2013 |
Permalink