Gravity Forms: Post Updates
Requires PHP 5.3 or greater Allows you to use Gravity Forms to update any post on the front end. If you use the “Gravity Forms + Custom Post Types”, you can even update custom post types and use custom taxonomies. Features Supports custom field file uploading and deletion with thumbnails or mime typ
Requires PHP 5.3 or greater
Allows you to use Gravity Forms to update any post on the front end. If you use the “Gravity Forms + Custom Post Types”, you can even update custom post types and use custom taxonomies.
Features
- Supports custom field file uploading and deletion with thumbnails or mime type icons for existing items.
- Fixed a bugs on multi selects and checkboxes.
- Fixed bug on Categories.
- Completely removed the ability to delete posts.
- There are some filters to customize things now.
- Adds non-query-var template method to setup a form.
- Adds a really basic shortcode to setup a form (UPDATE: This is still supported, but it is better to use the addition, below, to the gravityform shortcode).
- Adds an additional attribute to the gravityform shortcode: “update”
SHORTCODE
[gravityform id="1" update] // Loads current post for editing [gravityform id="1" update="34"] // Loads post where ID=34 for editing
We worked with Rocketgenius, makers of Gravity Forms, to get a small upgrade added that allows us to extend their shortcode, so now you can simply add the “update” attribute to the normal “gravityform” shortcode. If you only add “update”, it will load the current post in to update. If you add an integer to the update attribute, it will use that to load a post by its ID.
URL QUERY VARIABLE
- 01At the heart, it is pretty similar to how it was, but now there is a nonce required to activate it.
- 02So you should use the action to create your links. do_action(‘gform_update_post/edit_link’); do_action(‘gform_update_post/edit_link’, array( ‘post_id’ => $post->ID, ‘url’ => home_url(‘/edit_post/’), ) );
Arguments (query string or array)
- post_id (int) (optional) The id of the post you want to edit. Default: global $post->ID