Repeatable: Always
Steps to repeat:

  1. Add Multistep group to content type
  2. Add list (text) field, with widget "checkboxes/radio buttons"
  3. Add list(text), with widget "select list"
  4. 3. Create content
  5. 4. Save Content
  6. 5. Find/View Content

Expected Results:
All selections made in both fields during the creation of the content will display on the node

Actual Results:
Selections made via the checkboxes are not displayed on node; selections made in select list field do display.

Sidenote: When I moved the list (text) field (with the checkboxes) outside of the multistep group, the selections I made did display on the node. It is only when it is nested that they do not display. I also tried placing the field in a fieldset, but, it still did not print.

Any update/advice on this would be greatly appreciated!

Comments

Ogredude’s picture

Same circumstances and issue here.

Some differences though. On mine, if you hit "Save", it saves the field values just fine. If you hit "Next" or "Previous", the field values disappear when you come back to that step.

This also occurs when I use a select widget that allows multiple choices.

andi-d’s picture

Same her,

values in multiple select list wan`t be saved.

di3gopa’s picture

I am experimenting this issue also, at the moment you save the content on a current step it works, but when you change step, or click "Done" button, the content from checkboxes/radios it is not saved.

Also happens with term reference fields.

bbinkovitz’s picture

I believe this issue may offer some insights:

#1366534: Form API ['#access'] = FALSE drops form values, does not update correctly, for both standard and Ajax form rendering

The connection appears to be that the submit handlers that drop checkboxes are those with #access not set to TRUE.

bbinkovitz’s picture

I tried setting all relevant submit handlers' '#access' = TRUE to no avail.

I have observed that the values don't get dropped if only one value is allowed (radio buttons or dropdown) and all values (not just the ones after the first one) get dropped if multiple values are allowed (checkboxes, select list).

patchshorts’s picture

I've found a solution. My solution involves a custom form alter module that uses a swtch statement which unsets checkbox only fields(if it's a radio button I don't get the issue) in the form array for fields that aren't a part of the current step. Since this solution works 100% of the time, it's safe to assume that the problem exists in the $form array.

Here is what I did.

		switch($form['#multistep']['current']):
			case 'group_step1':
			break;
			case 'group_step_2':
				unset($form['field_please_indicate_any_areas_']);
				unset($form['field_do_you_have_any_of_these_h']);
				unset($form['field_do_you_have_any_allergies_']);
				
			break;
			case 'group_step_3':
				unset($form['field_please_indicate_any_areas_']);
				unset($form['field_do_you_have_any_of_these_h']);
				unset($form['field_do_you_have_any_allergies_']);				
			break;
			case 'group_step_4':
				unset($form['field_please_indicate_any_areas_']);
				unset($form['field_do_you_have_any_of_these_h']);
				unset($form['field_do_you_have_any_allergies_']);				
			break;
			case 'group_step_5':
				unset($form['field_do_you_have_any_of_these_h']);
				unset($form['field_do_you_have_any_allergies_']);
				
			break;
			case 'group_step_6':
				unset($form['field_please_indicate_any_areas_']);
				
			break;
			case 'group_step_7':
				unset($form['field_please_indicate_any_areas_']);
				unset($form['field_do_you_have_any_of_these_h']);
				unset($form['field_do_you_have_any_allergies_']);				
			break;
		endswitch;

You're welcome ;)

Amit Dwivedi’s picture

Issue summary: View changes

Thanks patchshorts :)

This Trick worked for me as well. I have used it to unset fields in field collection which is generating MCQ Answers for Questions in Multistep form.

nixar’s picture

This is a critical issue and this is happening to me for any field using checkboxes as the widget (bool and term reference)

wgallop99’s picture

Having this same issue as well. The solution above worked for me but would like to see a patch. I also had the same issue with a pdf upload field as well.

This seems like a pretty serious issue!

dkolarevic’s picture

I've never used this module, but I can confirm that solution #6 also works in my case. What I have is a form with multiple submit buttons, and after submitting, only checkbox values are lost. This is probably bug in Drupal core.