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

How to use form request data on thank you page #831

Open
djay opened this issue Aug 25, 2017 · 2 comments
Open

How to use form request data on thank you page #831

djay opened this issue Aug 25, 2017 · 2 comments

Comments

@djay
Copy link
Contributor

djay commented Aug 25, 2017

We have a situation whereby

  1. Normal user submits form
  2. onsavedocument sets the Plomino_Readers to admin and sends an email for it to be reviewed. It needs to be private as other information will be added to the document.
  3. redirect to thank you page. Thank you page has hidewhens or computed fields that depend on data in the form.

Normally you would solve this by redirecting to {docid}?openwithform=thankyou, however that doesn't work in this case due to the Plomino_Readers.

It's not really clear whats the going to be the most userfriendly way to support this common usecase (PFG easily allows displaying submitted data on the thankyou page).

Options

  1. Use multipage
  • ie thank you is always the last page in a multipage form. For this to work there needs to be a special custom save and next button combination where the document is created and onsavedocument is run but instead of a redirect, you go to the next page.
  1. Render thankyou on submit
  • instead of doing a redirect, render the thankyou page (or default readonly view) as a result of the form submission like PFG does.
  • would somehow need to update the location bar so the url is {docid}. Not sure if this can be done using 201 response, or perhaps with some JS?. or just live with the URL being the original form and if the form really wants to display it as the {docid} then the form could explicitly do the redirect in that case (e.g. to ensure the data is lost and you can't go back)
  1. Rethink permissions
  • instead of changing Plomino_Readers put security on the forms and views. However currently they are all open so to be save it would really require a change that all Forms and Views are created private to the creator and has to be published to allow others to use it. This could make exporting designs difficult.
  1. use cookies
  • have some special case where you can store the whole form in cookies or localstore for only the purpose of having it available on the next form (which is automatically done)

Thoughts @ebrehault @jean ?

@djay
Copy link
Contributor Author

djay commented Aug 28, 2017

any thoughts @jean @ebrehault ?

@jean
Copy link
Member

jean commented Aug 28, 2017

onsavedocument sets the Plomino_Readers to admin and sends an email for it to be reviewed. It needs to be private as other information will be added to the document.

Leave Plomino_Readers to the Author and put the private info on a different document, named e.g. <docid>_privates.

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

No branches or pull requests

2 participants