I've been battling with an issue where where the poll form (as a block) would fail to submit via ajax when placed in certain positions on the page. Eventually I found that within Drupal.settings.ajax the key for the ajax element was 'edit-submit', but the id of the submit button had changed to something like edit-submit--3, presumably to prevent an id clash with another form element.

It seems that specifying a unique id within advpoll_choice_form() fixes this issue. I have attached a patch of one possible solution.

CommentFileSizeAuthor
duplicate_id_ajax_faliure.patch375 bytespq

Comments

soulston’s picture

Status: Needs review » Reviewed & tested by the community

This works for me - I was having an issue with the login form having an ajax-processed class added.

off’s picture

Issue summary: View changes

Working! Thank you!

off’s picture

Why is this code missing in dev version?

tripper54’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Committed, thanks!