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

Contact form behaviour. #429

Open
8 of 10 tasks
dirkcuys opened this issue Sep 17, 2021 · 3 comments
Open
8 of 10 tasks

Contact form behaviour. #429

dirkcuys opened this issue Sep 17, 2021 · 3 comments

Comments

@dirkcuys
Copy link
Member

dirkcuys commented Sep 17, 2021

Option A: traditional post, create a new static page on www.p2pu.org for success
Option B: AJAX post, js to handle post logic and feedback UX

TODO:

  • Redirect normal POST to a success page
  • Create a static success page
  • Create react component to replace HTML form with async post functionality
  • Ensure POST URL is determined by config variable (default_base_api_endpoint)
  • Not working on Firefox?
  • No JavaScript redirect goes to non-existing page?
  • Email validation feedback is pretty sucky - you just get a message back saying something went wrong and then you get to retype your message :(
  • Copy and design of success/error messages
  • No JavaScript server side validation error displays DRF error - should redirect to form page or show a different error
  • p2pu-website React component should keep field state if server side validation fails
@dirkcuys
Copy link
Member Author

The contact form should be functional in as many circumstances as possible, iow we should use a traditional HTML form. We can implement an AJAX post as progressive enhancement

@dirkcuys dirkcuys changed the title Decide on contact form behaviour. Contact form behaviour. Sep 27, 2021
@dirkcuys
Copy link
Member Author

Issue with firefox is probably related to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite

@dirkcuys
Copy link
Member Author

dirkcuys commented Oct 1, 2021

Firefox issue was that authenticated users would send a csrf cookie with the request, but it was a wrong? cookie

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

1 participant