Ctools provides its submit buttons in $form['buttons'] and apparently privatemsg has a similar problem that cause mollom form elements to not detect them and show up underneath. It would be useful to allow the form to specify the key where these elements exist so the weight can be detected.

Comments

neclimdul’s picture

Status: Active » Needs work
StatusFileSize
new1.17 KB

I'm not sure what needs to be done in D7 but here's a quick functional patch without any docs or test.

sun’s picture

Category: feature » task
Status: Needs work » Needs review
StatusFileSize
new2.3 KB

Attached patch should work, but makes Node integration tests fail for some yet unknown reason.

sun’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
StatusFileSize
new778 bytes

oh, sorry - I've completely mistaken the intention of this issue. I might create a separate issue for the patch in #2.

For D6, we can hard-code another check for 'buttons'. In D7, all forms standardize to $form['actions'] = array('#type' => 'actions');.

neclimdul’s picture

Looks good. Is there a reason that providing the option to specify it in the definition wouldn't work? Especially since d6 isn't standardised.

sun’s picture

In D6, core does not provide a helper comparable to drupal_array_get_nested_value(), so in order to truly support configurable keys, we'd have to backport that function from D7...

In general, Mollom for D6 is mainly considered "frozen". This patch would be an acceptable stop-gap fix though.

neclimdul’s picture

Status: Needs review » Reviewed & tested by the community

It solves my d6 issue anyways, I'll have to deal with d7 when i reach that bridge i guess.

sun’s picture

Title: Provide ability to specify $form array parent for submit buttons » CAPTCHA output below submit buttons in CTools forms
Category: task » bug
Status: Reviewed & tested by the community » Fixed

Thanks for reporting, reviewing, and testing! Committed to 6.x-1.x.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.