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

Correct submission behavior for postal form #396

Merged
merged 3 commits into from
Nov 9, 2022
Merged

Conversation

tdo95
Copy link
Contributor

@tdo95 tdo95 commented Nov 8, 2022

For the postal form submission we wanted to:

  • recreate the on-click behaviour exhibited by the submit button
  • prevent the default form submission behaviour, which refreshes the page

Solution

I used the .prevent event modifier to prevent the default submission behavior so that pressing enter no longer refreshes the page, but instead executes the CreateRepList function to display the representatives.

ezgif com-gif-maker

--
Resolves #293

@tdo95 tdo95 requested a review from a team as a code owner November 8, 2022 15:58
Copy link
Member

@paramsiddharth paramsiddharth left a comment

Choose a reason for hiding this comment

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

@tdo95 Good job, Tee! :) Thank you for the much needed fix!

@paramsiddharth paramsiddharth merged commit 7ee438f into main Nov 9, 2022
@paramsiddharth paramsiddharth deleted the tdo95/postal-form branch November 9, 2022 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Pressing enter in the postal code form refreshes page
3 participants