Currently all forms are ajaxified.

It would be awesome to have the ability to configure this

  • Either fully disabled
  • Target on specific form ID's

Not sure what option is best, will try to come up with a patch as soon as I have some time.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jamix’s picture

Makes sense, will be happy to review the patch.

Still curious about the forms that are not ajaxified though, perhaps submit a bug for this?

swentel’s picture

Woops, wrong description. Effectively, all forms *are* ajaxified, sorry about that - will update the issue summary :)

OwilliwO’s picture

Hi guys !!

Here is a patch which allows users to exclude some submit buttons.
It add a new textfield in admin form, in which you can type some classes or ids.
This selector is used in javascript to unselect submit buttons in order not to apply them ajax process..
Then, you can add a custom class to submit button (with hook_form_alter) and exclude it easily !

Do you agree with it ?

PS : sorry for my english (french guy..)

jamix’s picture

Thanks for the patch! As suggested by swentel in the original post, wouldn't it be better to target form IDs instead?

OwilliwO’s picture

I prefer exclude buttons, because you can have two submit buttons in one form. For example, login form with gauth button (see https://drupal.org/project/gauth), i keep ajax process on "normal" submit button, but i need "normal" process on google sign in button..

If you really want to exclude complete forms, you can add a new conf field in admin form, to list form ids you want to be excluded..

OwilliwO’s picture

Issue summary: View changes

Updated issue summary.

jamix’s picture

OK, a few thoughts here.

First, using hook_form_alter() to add special classes to the submit buttons wouldn't be necessary if we are going to be able to enter selectors like #article-node-form #edit-cancel in the exclusion field. (Using #article-node-form input[type="submit"] would disable Ajax pages on all buttons in article_node_form, which would address the original request.)

Second, it may make sense to let the user enter selectors one per line as opposed to separating them with commas.

Third, the field should probably also allow to target <a> links for exclusion.