I've been searching high and low for any documentation on how to apply jquery form validation and ajax submit to any kind of drupal form, but it almost seems as if it's never been done, because it sure has hardly ever been publicly written about it.

I want to be able to submit Site wide contact form OR Webform via Ajax, and I assume that this module would be able to help with that. What I don't understand is how? Could someone shed some light on this? I really want to do this the Drupal way and not create a regular HTML form with ajax and jquery.

ps. I know there is a webform plugin, but it only works for the backend, and not on the client side

Comments

design.er’s picture

If you installed the Ajax Webform plugin, navigate to admin > settings > ajax. Here you should activate the checkbox for webforms but not the "Content Type: Webform" but "Webform: [title of the node you created with webform module]" which should be at the very bottom of the page.
btw: If you active the "content type: webform" checkbox then you active ajax for the backend -> node creation/editing.

Hope that helps.

I also would like to know how to activate Ajax for the core (sidewide and user) contact module.

pauldawg’s picture

Me too. here's hoping that future versions of Drupal provide more Ajax functionality in the core as well!!

Ye’s picture

By enabling ajax module and ajax-webform plugin of ajax module, ajax-ui plugin, and ajax disable redirect plugin, I was able to get the webform working with ajax form submission (and stay on the page after submission). However, there is no confirmation message what so ever, which is undesired. Anyone have experience with that?

arbel’s picture

same result here, no confirmation message.

JDK’s picture

I also do not receive any confirmation messages, not even a warning when submitting on WAMP with no mail server. I'm expecting "warning: mail() [function.mail]: Failed to connect to mailserver..." but nothing happens. My webform is in a block with redirection disabled in ajax settings.

sunchaser’s picture

same here, there should be an option added that allows for the entry of a confirmation message.

mtopping’s picture

I have found that by setting the confirmation message and setting the redirect url to the url of the webform node(clean or otherwise) I do get the messages returned. Your mileage may vary.

estepix’s picture

Has anyone tried this with contact form instead? I have it done for user and register forms, but cannot figure out how to get it working for Drupal default contact form.
Thanks! all tips are welcome!

Dubber Dan’s picture

subscribing

mattbk’s picture

subscribing

brendoncrawford’s picture

Status: Active » Needs work