Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple form elements on one page all display thank you message after one is submitted #50

Closed
michalkleiner opened this issue Jan 23, 2020 · 4 comments
Labels

Comments

@michalkleiner
Copy link

michalkleiner commented Jan 23, 2020

The presence of the /finished/#uff in the URL makes all UDF elements on the same page display the Thank you message even though only one was submitted.

PRs

@digitall-it
Copy link

I propose to change the URL to /finished/#uff=ID and check for that. If the fragment is grepped (i.e. the URL checked for the presence of the substring hashmark uff), then legacy code should continue to work. New code could instead discern for what form has been submitted.

@michalkleiner
Copy link
Author

@digitall-it the anchor fragment is not passed to the server, so it can't use it for any logic.

@digitall-it
Copy link

Fine. Can't then any variable be passed back to the frontend in the get URL to be used by javascript to locate and scroll to the right form? For example, surely the server knows the Form ID, and that can at least be passed back, like /finished/#uff?formID=ID (or what the correct syntax is). Then, it's a matter for the frontend programmer to add a data-formid="123" in the template to match it in the frontend.

@GuySartorelli
Copy link
Collaborator

PR merged. This will be automatically tagged by GitHub Actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants