Closed (works as designed)
Project:
Colorbox Node
Version:
7.x-3.4
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Feb 2015 at 04:57 UTC
Updated:
5 Feb 2017 at 02:53 UTC
Jump to comment: Most recent
Comments
Comment #1
butteryak commentedAdding the &destination=node/xxx works for me to redirect to a specific page on submit.
<a class="colorbox-node" href="contact" data-href="contact?width=600&height=600&destination=node/368">Contact Me</a>The challenge I had was how to dynamically create that destination to redirect back to the page that I opened the colorbox from, so I just redirect to a confirmation, "thank you for submitting this form. and then with a little javascript create a "Return to the previous page" link.
Not elegant, but it works.
Also make sure your using webform-ajax module. I don't think my webform_ajax is working properly though, which may be why I had to do it the way I did.
Comment #2
abarpetia commentedSorry for late reply. I used webform-ajax module but no success. I am not a good developing so would you like to share your javasript code with me?
Thanks in Advance.
Comment #3
swhitters commentedI've been looking for a solution to something similar for months. I'm no php expert so this can probably be streamlined, but here's what worked for me. This gets the URL of any page you put it on and I can keeps classes and the id for the link.
Comment #4
iLLin commentedIm confused on this thread as there is redirect stuff in place through the API. Please provide more information on what the problem is and what you are trying to do, so that I can point you in the right direction.
Comment #5
abarpetia commented@iLLin: What I was after is a way to close Colorbox popup after Webform submission rather than redirecting to form submission page. I think this issue is already solved. If I enable Ajax Mode then user is no longer redirecting to webform page. Thanks
Comment #6
iLLin commentedok Great!
Comment #7
delacosta456 commentedhi @swhitters and @abarpetia
i am not ok with code so where to put this code in my below example:
i have a view with field display.
i have the "Add comment link" field added to view where i rewrite the result and output as link to add colorbox-node class which work perfectly.
Now i want the color box to be close after saving comment en refresh the page from which link was clicked