After I changed the value of the submit button by using a node edit form as described here:
http://drupal.org/node/601646

I get the following error:
warning: Invalid argument supplied for foreach() in G:\Tom\Sites\drupal\sites\all\modules\cck\modules\content_multigroup\content_multigroup.node_form.inc on line 397.

The line that changes the value of the button in my node-order-edit.tpl.php file is this:
$form['buttons']['submit']['#value'] = t('Order now');

Any idea how to solve this?

CommentFileSizeAuthor
#1 cck_multigroup_submit.patch780 bytesyingtho
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yingtho’s picture

Status: Active » Needs review
FileSize
780 bytes

I had the same problem and have included a patch to resolve the problem. Not sure if it's the right way the code should go.

tomsm’s picture

Applied the patch. Solves my problem. Thanks!

manuel.adan’s picture

Issue tags: +#submit, +node form, +node edit

I have same issue but this patch does not solves it, may be another module related issue because node is not saved at all and I got a form refresh. This is a work around to it:

$form['buttons']['submitvalue']['#type'] = 'markup';  
$form['buttons']['submitvalue']['#value'] = '<input type="button" value="YOUR SUBMIT BUTTON LABEL HERE" onclick="this.form.submit()" class="form-submit"/>';
$form['buttons']['hidesubmit']['#type'] = 'markup';
$form['buttons']['hidesubmit']['#value'] = '<script type="text/javascript">$("#edit-submit").attr("style", "visibility:hidden");</script>';
$form['buttons']['hidesubmit']['#weight'] = 50;
masher’s picture

This patch fixed my problem sending emails using Simplenews and Content Multigroups.

Images in Content multigroups were deleted when a node was sent to email.

Thanks

jdanthinne’s picture

Status: Needs review » Reviewed & tested by the community

The patch fix my problem (Simplenews + Multigroups) as well.

jdanthinne’s picture

Can you commit please?

tomsm’s picture

Issue summary: View changes

This patch is still needed after updating to CCK 6.x-3.0-alpha4.

Changed line 323 of "content_multigroup.node_form.inc" to:
if ($form_state['submitted'] && !$form_state['multigroup_add_more'] || $form_state['buttons']['submit'][0]['#value'] == t('Save')) {

Please commit.

DamienMcKenna’s picture

Version: 6.x-3.0-alpha3 » 6.x-3.x-dev
Parent issue: » #2510648: Plan for CCK 6.x-3.0 release