0

I have a multi step webform, which I'm using as a kind of configurator. I want to allow people to share the link, so they can land on the last page of teh form with all the other values already set.

I configured a custom path (people will ask for a nice url instead of the default one)

I configured GET (custom) und Webform > Settings > Form > Form Custom Settings

I'm forced there to enter a submission url, so I entered the same url as for the custom path.

The issue is now, that I'm stuck on the first page - a lot of params are added to the url, but I'm not getting to page 2.

If I use a different submit url, then the forms on I land on a 404 page.

How can I solve this?

2
  • I opened drupal.org/project/webform/issues/3401813 to address this issue
    – Andreas
    Commented Nov 15, 2023 at 10:47
  • Answer from the maintainer: "GET will never work with multistep because the form data is tracked via the POST" - I asked for a workaround.
    – Andreas
    Commented Nov 16, 2023 at 14:31

1 Answer 1

0

Alright, so the maintainer was very clear, that he will not support GET in a multistep webform. In order to still realise our requirements I had to become creative:

  • multistep webform for the configuration process (dissabled submit button)
  • on the last page I added a custom link via the "computed twig" form element which leads to a view with exposed filters
<a class="btn btn-primary" href="{{path('view.viewId.pageId', {arg_0: data.state, title: data.title, other_field: data.other_field})}}">link text</a>
  • the view has then a context filter (arg_0) and exposed filters, which correspond with the parameters from the link. The exposed filter itself is configured to be a block ,so it is not shown.

It works pretty well, and if you choose the urls right, the flow is frictionless

In case it helps somebody else :fingers_crossed:

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.