I'm getting an illegal value when I click next step from the step with the select or other widget in it.

When I disable the multi step form, I receive no errors and the form submits fine.

This is a node form btw.

Thanks

CommentFileSizeAuthor
#4 multistep-1.x-1308030.patch658 bytesnathanhilbert

Comments

chrislabeard’s picture

Anybody have any idea why this is happening?

WoozyDuck’s picture

Priority: Normal » Critical

Same issue here

fnikola’s picture

i'm experiencing the same issue with multistep 6.x-1.5 and select (or other) 6.x-2.11. I am allowed to submit the page with the select or other value entered (in the other textbox) on that page, but then all other pages/steps fail with the illegal value error.

nathanhilbert’s picture

Status: Active » Needs work
StatusFileSize
new658 bytes

This is hitting the form validation of CCK text field module on line 156.
if (count($allowed_values) && !array_key_exists($item['value'], $allowed_values)) {
$item['value'] is passing here with a value of "off" which is outside my allowed values of 0 and 1. I can only guess that core provides the default "off" if the access is denied as happens in the multistep module on line 548 :
$form[$field_name]['#access'] = FALSE;
I have a provided a patch that changes the field type to "value" essentially making it a hidden field, but allowing the values to be passed, which is able to pass the text.module validation in cck. I'm not sure of the implications of this beyond my specific use case, but it works. I'm open to safer ways of allowing values to be passed without the user seeing them in the multistep form.
I have not tested this with select (or other) module.

nathanhilbert’s picture

Disregard the patch. It doesn't fix anything. A simple change that doesn't help with the select (or other) module: change your allowed values for select field as "off" and "on". I think the fix is beyond my knowledge.

marleo’s picture

Same problem here. Replaced select_or_other with cck_select_other and it worked. Would've preferred to keep the former, though, because of UI differences.