O'Reilly logo

Drupal 7 Webform Cookbook by Douglas Vernon Denny

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a hidden component

This component is useful when we wish to have data stored in the database that the site visitor did not explicitly enter.

How to do it...

Let's see how we can add an invisible component to our form.

  1. Add a new Hidden component named Browser Type and click on the Add button.
  2. Under Default value we enter the super token %server[HTTP_USER_AGENT] and click on Save component.
  3. We leave CONDITIONAL RULES as they are to ensure that this component always receives a value.
How to do it...

How it works...

Hidden fields are not truly hidden in the fullest sense of the word, they are merely hidden from view as far as the form user is concerned. The field ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required