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

Submission submission via Webforms #1125

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

brontolosone
Copy link
Contributor

@brontolosone brontolosone commented Jan 22, 2025

Closes getodk/web-forms#23 and getodk/central#883

Underlying strategy: redirect the Enketo URLs for form filling, previewing, public links etc to central-frontend routes. Then decide dynamically (based on a form's settings) whether to use Webforms, or Enketo after all (in an iframe).

See Google doc, Jan 21 meeting notes for loose ends.

Depends on: #1141 should be merged first.

This branch still uses web-forms#v0.6.0 that doesn't emits submission payload, hence I have kept dead code in here. I will enable that code in the related PR when a new version of web-forms is available.

There is one unanswered question about what to do when session times out while filling out the Form, that will be handle in getodk/central#910.

Another known issue to me is that if you copy the URL from the "New Submission" button and paste it in a new browser or incognito window, you will see error message instead of login page. I don't if that's important to fix. I can fix it with getodk/central#910 if required.

@sadiqkhoja sadiqkhoja force-pushed the wf23_webforms-in-central branch from fd66477 to 0cac584 Compare March 5, 2025 20:20
@sadiqkhoja sadiqkhoja requested a review from matthew-white March 5, 2025 21:11

location ~* "^/-/(?<enketoPath>single|X)/(?<enketoId>[a-zA-Z0-9]{31})" {
# Form fill link, public
if ($request_method = GET) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this if condition is not necessary because we only send GET request to this location

</template>
</modal>

<modal v-bind="submissionModal" hideable backdrop @hide="submissionModal.hide()">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this modal can be move to separate file, but I am expecting UI changes to this so I will move it along with those changes.

Comment on lines +509 to +514
},
"formSetting": {
"formTech": "Web based form technology",
"enableWebForms": "Use WebForms instead of Enketo",
"enableWebFormsExplanation": "When users fill out forms via the web (not via ODK Collect), we use Enketo by default. Its successor is \"WebForms\", which is a work in progress that you can already test.",
"enableWebFormsExplanationLinktext": "Before enabling this, read up on WebForms and which form features it currently supports!"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking to remove these translations and enter static text since they might change

@@ -96,12 +96,18 @@ export default {

$border-height: 3px;

:root {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember why this change was made, I should revert this.

@sadiqkhoja sadiqkhoja marked this pull request as ready for review March 5, 2025 21:17
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

Successfully merging this pull request may close these issues.

Provide filled instance to host application for submission
2 participants