Closed (fixed)
Project:
Popups API (Ajax Dialogs) [D7]
Version:
6.x-1.1-rc4
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
5 Nov 2008 at 21:15 UTC
Updated:
24 Nov 2008 at 20:02 UTC
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
Comment #1
nextpulse commentedBTW:
I know that popups-form will keep the box open.
But I want to close it on success.
Comment #2
starbow commentedInteresting use case. I will have to think about it.
Comment #3
starbow commentedOk, 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.
Comment #4
nextpulse commentedSome 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
Comment #5
starbow commentedSurprising.
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".
Comment #6
nextpulse commentedI 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.
Comment #7
nextpulse commentedDid 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)
Comment #8
starbow commentedTricky. Why don't you open this as a new issue, and we'll see if anyone else is having the same problem.