PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Do not want to save form entries

  1. We are using gravity forms as an anonymous way for users to submit suggestions to a CEO. Is tehre a way to disable the form entry manager feature so that it does not save entries?

    Posted 12 years ago on Wednesday August 1, 2012 | Permalink
  2. David Peralty

    Here is a thread about that:
    http://www.gravityhelp.com/forums/topic/purposefully-not-save-form-in-entries-database#post-15601

    Posted 12 years ago on Wednesday August 1, 2012 | Permalink
  3. Guys, that sort of hoopla to stop a form from saving entries makes no sense.

    In GFFormsModel::save_lead() wouldn't the following Just Work(tm)?

    `
    if($lead == null && apply_filters( "gform_save_lead", $form, true ) { ... } else return;
    `

    Posted 11 years ago on Thursday July 4, 2013 | Permalink
  4. Step earlier in GFFormDisplay::handle_submission probably makes more sense.

    Posted 11 years ago on Thursday July 4, 2013 | Permalink
  5. David Peralty

    Can you give more information so that when our developers look at this on Monday, they'll have all the information they need to respond? Walk me through your thought process more. Gravity Forms was designed by default to save leads to the database, and it is rare that someone doesn't want it to do that.

    Posted 11 years ago on Thursday July 4, 2013 | Permalink
  6. Well, in this scenario I have a simple selection of dropdowns that the user can operate with. There is no textual input. It's just a utility filter form, I have no interest in the selections the users make. I could code this by hand, but the GUI form editor and other goodness makes me want to use GF and get it over with.

    Since I don't need any validation, this works for me in this scenario:

    function io_form_pre_validation( $form ) {
        if ( ! isset( $form[ "id" ] ) ) return $form;
        if ( $form[ "id" ] != 5 ) return $form;
    
        foreach ( $form[ "confirmations" ] as $c ) {
            if ( $c[ "type" ] == "redirect" && isset( $c[ "url" ] ) )
                wp_safe_redirect( $c[ "url" ] );
                exit;
        }
    }
    add_filter( "gform_pre_validation", "io_form_pre_validation" );

    But if I did want the GF validation goodness in some form, yet don't need the leads saved, then I'd really like to be able to be able to add_filter-override the handle_submission -> save_lead chain.

    Posted 11 years ago on Thursday July 4, 2013 | Permalink
  7. Thanks for the suggestion. That hook does make sense. I will be looking at adding that in a future version.

    EDIT: Actually, I need to take another look at this. There are some things such as notification and Add-Ons that do require an entry to be created, so even though that filter will "work" and the entry won't be saved, it could also create issues in other areas.

    Posted 11 years ago on Monday July 8, 2013 | Permalink

This topic has been resolved and has been closed to new replies.