• Resolved mariepnwcdr

    (@mariepnwcdr)


    How do I create notification with an “all fields except” option? I can’t select individual responses for the notification because A) there are too many, and B) the prompt gets removed for some reason. How do I display [ALL FIELDS EXCEPT] in a notification? There must be a short code or something??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Ralden Souza

    (@rsouzaam)

    Hi ,

    Currently we don’t have the feature to exclude fields from notifications using the {all_fields} smart tag. I’ve made a note of the feature request and we’ll keep it on our radar to be reviewed as we plan out our roadmap for the future.

    But you should be able to do this with custom code, like this:

    add_filter( 'wpforms_entry_email_data', function ( $fields, $entry, $form_data ) {
    // Bail early if form ID is not equal to 908
    if ( $form_data['id'] !== 908 ) {
    return $fields;
    }
    // Unset field from notifications with field ID #2
    unset( $fields[2] );
    
    return $fields;
    }, 10, 3 );

    Please replace the form ID 908 for the ID of your form. In case it helps, you can see our guide on how to locate Form ID and Field ID.

    In case it helps, here’s our tutorial with the most common ways to add custom code like this. For the most beginner-friendly option in that tutorial, I’d recommend using the WPCode plugin.

    I would also like to mention that this code customization falls beyond the scope of support we offer, and this code snippet is provided as a courtesy. In case you’d like to look into custom development options, we highly recommend using Codeable.

    Hope this helps!

    Plugin Support Ralden Souza

    (@rsouzaam)

    Hi @mariepnwcdr,

    We haven’t heard back from you in a few days, so I’m going to go ahead and close this thread for now. But if you’d like us to assist further, please feel welcome to continue the conversation.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘how to create notification with “all fields except” option’ is closed to new replies.