Webform: How to prevent rendering of private fields I'm using Webform. Because I wanted to add custom flag for submitted data, so I used this approach with private fields https://drupal.stackexchange.com/a/137847/24385

Is it possible to render such form without private field only on my web? In admin section is everything ok and don't want to change nothing here. Private fields are shown only to users with results access. But what can I do if I want to display the same form for all users. On the web it doesn't matter for me whether user is anonymous and logged in. I need to display form without private fields here. Private fields are important to see only in admin section.

Thanks a lot :)
I've found that best solution is to use hook_form_alter to remove element from rendering. It can be achieved by this workaround: $form['submitted']['my_field']['#access'] = FALSE;