2

I'm using Webform 3 on Drupal 7. I have a form on my site for people to report problems with the website itself. Many of these reports ultimately turn out to be browser- or OS-specific, but often users do not add such information in their initial report.

Is there any way to automatically capture the browser and OS information, etc. in Webform upon submission?

1 Answer 1

2

It appears webform allows a default value using %server variables, but only for authenticated users.

In addition to %get and %post, the following super tokens may be used, though only with logged-in users: %server, %cookie, and %request. For example %server[HTTP_USER_AGENT] or %session[id].

For authenticated users, try adding a User Agent field with a default value of %server[HTTP_USER_AGENT]

If your form submissions come from anonymous users, you may need an alternative way to add the %server tokens.

Other $_SERVER variables documented here: http://php.net/manual/en/reserved.variables.server.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.