Hi,
When receiving the notification email, the hidden fields show. How can these not be shown?
I have tried the tag suggested in a previous thread {all_fields:nohidden} , but this doesn’t seem to work.
Hi,
Instead of using {all_fields} you could specify each field separately:
…etc.
Will that work for you?
Best,
Phil
I forgot to mention - if you go that route you should also add the field labels manually:
First Name: {First Name:1}
etc.
Phil
Hi Phil. Thanks for the feedback, but that won’t really be an option unfortunately (or it would be the last resort), as the form has many fields, lots of conditions etc. and it would just be too clumsy.
Thanks, will have a read through. I did see this though, which explains why the :nohidden doesn’t work.
:nohidden hides field output of fields using the Hidden field type. It doesn’t affect to fields set to a Visibility of Hidden.
My fields aren’t hidden fields, they are just set to hidden.
Ah yes - that would explain it… but one often wants fields of all types hidden conditionally, and therefore can’t use :nohidden to omit the conditionally hidden fields from notifications, as you point out.
I’m not 100% sure, but I believe the Gravity Forms All Fields Template plugin might do it for you.
Best,
Phil
I was reading the documentation: https://docs.gravityforms.com/fields-merge-tag/
It seems there is no way to suppress visibility-hidden fields from the {all_fields} tag.
In some cases, like when the form is submitted, non-visible fields might be empty, which is one option. But for something like a hidden dropdown field, there might be a default option, so that would be sent in the email with {all_fields:empty}.
A merge field like {all_fields:visible} would be useful.
We’ve got a snippet that modifies the behavior of the :nohidden
merge tag modifier to also apply to field that are set to hidden or hidden via the gf_hidden
or gf_invisible
CSS classes.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.