Viewing 3 replies - 1 through 3 (of 3 total)
  • i would love to know how to do this too. thinking it may be possible using this but havent figured out how yet: https://vfb.matthewmuro.com/hooks/vfb_skip_empty_fields/
    can someone give us a tip on how to use this?
    cheers!

    Thread Starter cloudedyellow

    (@cloudedyellow)

    Well, you can exclude all “empty” fields as a default, or as you say use vfb_skip_empty_fields and specify each field individually.

    The issue with doing all empty fields in my opinion is that I personally would like to have empty fields appear in the email so I can tell they haven’t been filled in, and have the opportunity to do that myself manually, whereas hidden fields were never there in the first place, and therefore not needed in the email at all. We really need a global switch to exclude all “hidden” fields.

    If you do want to remove all empty fields as a default, edit line 196 in ../public_html/wp-content/plugins/visual-form-builder-pro/includes/<email.php in latest vfb release, changing false to true in the following line of code so it reads:-

    $skip_empties = apply_filters( ‘vfb_skip_empty_fields’, true, $form_id )

    Also, this file will be overwritten at every new release, so this method is not recommended.

    Trev

    Plugin Author Matthew Muro

    (@mmuro)

    There’s no need to edit the source code. That’s what the filter is for.

    Insert the sample code from the hooks page linked above into your theme’s functions file.

    As far as skipping hidden fields, it’s just not possible.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Exclude hidden fields in email’ is closed to new replies.