• Resolved Stencies

    (@stencies)


    Post updates doesn’t like it when you have multiple forms on a single page and you are using the update attribute in only 1 of the shortcodes. This causes the other forms to update the Post by using the specified ID.

    A quick fix is to specify update=0 on the shortcodes that does not require post updates not sure if this is an effective way to do it

    https://ww.wp.xz.cn/plugins/gravity-forms-post-updates/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jupitercow

    (@jcow)

    I have an update that can improve this, but only for forms with different ids. If you wanted to include the same form twice in a page once to add a post and once to edit a post, the add would have to be first. I am having a hard time unsetting the update feature after it is set for a form.

    I will add it later tonight.

    Plugin Author Jupitercow

    (@jcow)

    This is updated in latest release. If you don’t added “update” in the short code, it should remove update even if set by a previous form on the page.

    If you need to do this when using do_action('gform_update_post/setup_form'); in templates, it isn’t quite as straight forward, but could be done by unsetting some core filters:

    remove_filter( 'gform_form_tag', array('gform_update_post', 'gform_form_tag'), 50 );
    remove_filter( 'gform_pre_render_' . $form_id, array('gform_update_post', 'gform_pre_render') ); // only needed if a form id was previously specified in setup_form
    remove_filter( 'gform_pre_render', array('gform_update_post', 'gform_pre_render') );
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Multiple forms on single page’ is closed to new replies.