Active
Project:
Popups API (Ajax Dialogs) [D7]
Version:
6.x-1.1
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Jan 2009 at 13:51 UTC
Updated:
25 Jan 2009 at 02:04 UTC
I am implementing search/node as a popup, but am have trouble with the configuration settings for the search form. Right now, when a user performs a search submission, the results are rendered in the popup, but I would prefer the results to occur in the main body. Apologies for such a basic question, but i've been struggling over this for a couple of days now, and still scratching my head, and have not found any advice in the documentation.
thanks for any help.
=peterd
Comments
Comment #1
starbow commentedIt's not a stupid question. I think it is possible, but tricky. I think there is another issue asking this question, and I advised them to try using the forceReturn option. But I never heard if it worked for them.
Comment #2
Max_Headroom commentedI got a similar problem. And I don't think forceReturn is going to work because the link is build AFTER the form was submitted, based on information obtained from the form.The way I understand forceReturn, you put a url in the popup options in the original link that opens the popup.
Can you maybe look at adding an option that works like this?
Click popup link on page. Popup form opens. Enter values and click submit. Popup close and the new page opens based on information from form.
Comment #3
sirkitree commentedYou may then want to look at the afterSubmit option that went in recently #336063: Add an "afterSubmit" option to hook_popups().. I've been using it very successfully to do things like this. Example: After a confirmation form is submitted, show a custom dialogue (Drupal.popups.message()) or redirect to another page of your choosing. I'm sure that based upon the data entered in the form you should be able to something like
Comment #4
starbow commented@Max - you are probably right. It seems like forceReturn would have to be tweaked a bit to work in this circumstance.
@sirktree - very clever suggestion. I bet that could work. Although I don't think you'd want to have myPopupsAfterSubmit be a behavior. Just a plain function would do.