I hope someone can help me because my tiny little brain is bamboozled!
What I want to do:
- Use webform with multiple page breaks to allow site visitors to enter information such as text and numbers
- Once a user enters a number (x) on page 2, that information is displayed on page 3 via a token
- Said number (x) is then multiplied by 75% and displayed as another number (y)
i.e. Thank you for your interest. Your property is worth number (x) and we can offer you number (y) today - Tick box is selected by user to confirm happy to submit completed form, before pressing submit to complete
What I can do:
- Use webform with multiple page breaks to allow site visitors to enter information such as text and numbers
- Once a LOGGED IN/AUTHENTICATED user enters a number (x) on page 2, that information is displayed on page 3 via a token
i.e. Thank you for your interest. Your property is worth number (x) - Tick box is selected by user to confirm happy to to submit completed form, before pressing submit to complete
What I can't do:
- Once an ANONYMOUS user enters a number (x) on page 2, that information is displayed on page 3 via a token
- Number (x) is then multiplied by 75% and displayed as number (y)
- i.e. Thank you for your interest. Your property is worth number (x) and we can offer you number (y) today
:-( I hope that's in depth enough. In a nutshell, I have 'Drafts' option set up on advanced settings (thanks for your help there quicksketch) and as such using %value[property_value][estimate] is being shown properly when used by an authenticated user, but an anonymous user is just shown the token and not their previously inputted value.
As far as the multiplication element goes, I know this is probably being cheeky but any help would be much appreciated. I have got as far as adding a PHP filter and doing a basic maths equation. When I type numbers into the equation, i.e. 4 * 5, it works fine. However 'token' * 5 just displays 0, I'm guessing it's ignoring the token value and treating it as 0. I have tried setting up the field as an integer and textfield without any success :-(
Comments
Comment #1
stuhannaford commentedI've worked around it in the end. Anybody interested this is what I did:
If anyone wants to see it in action, please visit http://www.fasthousesellnow.co.uk
Comment #2
quicksketchAs this solution requires custom code, it's unlikely that any further updates will be made here (since I don't give support on custom coding in the Webform issue queue).