Skip to content
This repository has been archived by the owner on May 28, 2020. It is now read-only.

Does / can the create / update form send back a preview url? #5

Open
dave-mills opened this issue May 25, 2018 · 2 comments
Open

Does / can the create / update form send back a preview url? #5

dave-mills opened this issue May 25, 2018 · 2 comments
Assignees

Comments

@dave-mills
Copy link
Member

The NRC team miss your preview-in-enketo url in your original demo. Can the app return a preview url with the response from the customDeployForm and customUpdateForm endpoints?

@dave-mills dave-mills added the Type: Enhancement New feature or request label May 25, 2018
@chrismclarke
Copy link
Contributor

the problem of doing things not asked for in the first place! my bad, sure will put it back in.

@chrismclarke
Copy link
Contributor

Ok, so the link can easily be generated by sending a request to /forms/{pk}/enketo. As we don't plan to delete the temp files/forms it probably makes sense to just send do this all client size as:

  1. make form POST with form json (even if just temp)
  2. confirm response of form object, including formid field
  3. make new GET request to /forms/{pk}/enketo
  4. open the response enketo_url in an iframe/new tab/popup or however desired

I could make an endpoint to merge steps 1-3, however this might be overkill. Let me know what you think @dave-mills

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

No branches or pull requests

2 participants