Skip to content
This repository was archived by the owner on Oct 29, 2020. It is now read-only.

Redirect with modal open on form error.#1858

Merged
DFurnes merged 3 commits intoDoSomethingArchive:devfrom
DFurnes:address-stuff
Apr 18, 2014
Merged

Redirect with modal open on form error.#1858
DFurnes merged 3 commits intoDoSomethingArchive:devfrom
DFurnes:address-stuff

Conversation

@DFurnes
Copy link
Contributor

@DFurnes DFurnes commented Apr 18, 2014

Redirects to page with modal hash in URL if there's a form error (will trigger modal on load with updates in Neue).

@barryclark
Copy link
Contributor

👍 !

@weerd
Copy link
Contributor

weerd commented Apr 18, 2014

🌞 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Won't this reload the page and the user has to fill out the form again?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, but only on form errors (which would currently reload the page but not include the modal hash at the end).

Copy link
Contributor

Choose a reason for hiding this comment

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

The difference for current behavior though is that the form reloads with the user input still filled out (but they do need to figure out to click on the link again). Not going to keep me up at night or anything, its just something we lose by doing the drupal_goto.

@DFurnes
Copy link
Contributor Author

DFurnes commented Apr 18, 2014

So this isn't great, but it should be fine enough for now. If Drupal outputs a .messages class at the top of the page, we copy it into a container in the modal. We lose the user's filled form state

screen shot 2014-04-18 at 1 55 32 pm

@DFurnes
Copy link
Contributor Author

DFurnes commented Apr 18, 2014

Gonna merge this guy in so that @mikefantini can check it out on staging. This is only a temporary fix until we can run the address validation as a client-side check before submitting the form, so it's a bit messy but not permanent.

DFurnes added a commit that referenced this pull request Apr 18, 2014
Redirect with modal open on form error.
@DFurnes DFurnes merged commit 46db273 into DoSomethingArchive:dev Apr 18, 2014
@DFurnes DFurnes deleted the address-stuff branch April 18, 2014 17:57
@barryclark
Copy link
Contributor

Nice job @DFurnes @angaither 👍

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants