0

I'm trying to use a webform to accept data, do some processing and calculation, and pass it back to the user. For user-friendly purposes I don't want to redirect to a confirmation page, but back to the form page so they can enter the information again. So essentially, I want the form template to submit back to itself, and if it has received a submission, print out the results (for now). I'm having trouble finding a way to do this.

I have an override template (webform-form-9.tpl.php) in my theme folder and it is successfully overriding the default, however I can't find any any way to actually get the values the user just submitted - even printing all available variables doesn't display the submission. I can't even seem to check if the user submitted a form or not. Does the form template not even receive the submission data? That seems extremely peculiar if so, so I can only imagine I'm not just not getting it right.

Any advice here?

1
  • So I've managed to get the data displaying on the form template by redirecting the form to a custom URL consisting of the current URL (the form template) and the sid of the submission, then getting the submission data through nid and sid. But I still want to keep the form populated with the info they entered, whereas when the page reloads, the form fields are empty. How can this be accomplished?
    – CGriffin
    Feb 2, 2017 at 21:05

1 Answer 1

0

Just configure your webform, so the "redirect URL" is the following:

node/[node:id]/submission/[submission:id]

Now after submission you will see the result overview page of that submitted form

Your Answer

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

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