Any one know how to get the form to stay in the 'popup' dialog when there is a validation error (or similar)?

for example, a login popup.
- If the username/password is wrong, then stay in the dialog (so user may try again)

Comments

nextpulse’s picture

BTW:

I know that popups-form will keep the box open.
But I want to close it on success.

starbow’s picture

Interesting use case. I will have to think about it.

starbow’s picture

Status: Active » Fixed

Ok, this has been added to RC5.

* new option: reloadWhenDone - better way to cold reload the page, b/c form will stay in popup
on validation errors
* new class: popups-form-reload - adds popup behavior to link, with option reloadWhenDone = TRUE.

nextpulse’s picture

Some issues I am seeing:

- it works in the test page (popups/test). So I know its all installed and cache it ok.

- when running in my own theme, the popup just stays open on success. Any ideas on how I can debug this?

So this is the url I have in my theme. On success the popup just stays open. It behaves just like a popups-form.

Login

starbow’s picture

Surprising.
You are probably getting some kind of html error message back from Drupal. The way to debug is to get the Firebug extension to FireFox, open up the console tag, and look at the response that is coming back from the server on success. Another clue is to look at the Request Headers, and make sure "X-Drupal-Render-Mode" is set to "json/popups".

nextpulse’s picture

I am running firebug - its not html error.
From the debug - on the GET:

X-Drupal-Render-Mode json/popups

(Hence I get the pop up).

Now - what should it be on the post? As the post returns back to the same popup.

nextpulse’s picture

Did more testing, seems to be a issue(bug?) somewhere:

So, if the url is:

http://www.mydomain.com/popups/test

Then it works.

But If I go via a different path:

http://www.mydomain.com/user

then this fails.

(So far, the login only works if the url is /popups/test. Not on any other pages. The only diif I see is that body has the class page-popups)

starbow’s picture

Tricky. Why don't you open this as a new issue, and we'll see if anyone else is having the same problem.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.