Modal Windows in Drupal
Any experienced Drupal developers out there? I'm attempting to a put my contact form in a modal window and submit via ajax:
http://www.ericmmartin.com/simplemodal/
For some reason my submit button doesn't work, no action happens at all. Here is my markup:
<form action='download/' method='post'>
<input type='button' name='contact' value='Demo' class='demo' />
</form>
I've also tried this:
<a href="#" id="contactLink">Contact</a>
Does anyone know if there is a problem with drupal processing an external php file or why my submit button doesn't work? I've been in contact with the man who wrote this script and he has no idea why mine doesn't work, even after inspecting the head of the document. I can easiliy get this working in a non-drupal environment, so I think it has something to do with the way Drupal expects for it to be called. Any thoughts or hints in the right direction would be so helpful. I have spent hours on this and am a little discouraged.
demonhale posted this at 18:06 — 17th September 2008.
He has: 3,278 posts
Joined: May 2005
Here is a suggestion, why don't you make the ajax contact form on a separate page and the iframe it to the modal window, I'm pretty sure the form will work that way...
emartin24 posted this at 15:58 — 4th October 2008.
They have: 1 posts
Joined: Oct 2008
I created a Drupal module for my SimpleModal Contact Form:
http://www.ericmmartin.com/smcf-drupal-module-release-beta/
It's my first attempt at a module, so I'd appreciate any feedback.
-Eric
decibel.places posted this at 18:52 — 4th October 2008.
He has: 1,494 posts
Joined: Jun 2008
<form action='download/' method='post'>
<input type='button' name='contact' value='Demo' class='demo' />
</form>
Sounds like you have a php mail() form, but the action is not correct, it is set to 'download/' which looks like the action that comes with the demo code. Action should point to your php mail processing file.
I've also tried this:
<a href="#" id="contactLink">Contact</a>
Generally I use
<a href="javascript:void(0)"...
for dummy links. But this link won't do anything unless you add an onclick="somecodehere" handler...I am an expert troubleshooter, and quite familiar with Drupal, so PM me if you still need help
[edit]
It's my first attempt at a module, so I'd appreciate any feedback.
Perhaps you are finding a problem with this experimental module - Drupal has other lightbox/thickbox modules.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.