We have a 4.0 Webform on our Drupal 7 site which calculates a value based on questions using 'Webform Calculations'. This works well.

Using Webform 4.0's native conditionals (or otherwise) we would like to use the results of the above calculation AND the logged-in user's age (which is recorded on a Profile) to conditionally show more questions.

So for example:

Webform calculation result ABC = 30
(current user's age is 20)

If (ABC > 25) AND (current user age > 20) show Question 4

At the moment Webform Calculations does not support the above but we need this ability.

Please respond via the Drupal contact form with your contact details, your timeline for completing this work and your estimated cost. Thank you.

Comments

pobster’s picture

PLEASE don't pay anyone anything for achieving this, it's a simple two second job.

In your webform components, just create a number field and populate the value with the token which represents your user profile field. In the classes, apply a class which makes it hidden or just make a form_alter to fully convert the form item to be hidden (it doesn't matter so much). Now in the conditionals, you'll have access to the field and also the ability to use "more than" / "less than" etc.