Hi.

When I go to create a poll and set my options on 'Poll type', 'Cancel vote' and 'Show results before voting'; it seems to save them the first time but when I go back and edit the poll these fields go back to their default state as stated by the module. Looking at code it seems as though the default values are not set properly on these three fields.

The data is in $items[$delta]['poll_features'] in pollfield_field_widget_form() but as a serialized array. I have unserialized this and shoved the correct data in the default values. Now the fields stay at what you set them too. Patch attached.

Also, I have gone through the pollfield_field_widget_form() function and sorted out some of the padding issues and I also saw some (consistent) spelling mistakes through out this function and have fixed them too.

Ta.

CommentFileSizeAuthor
#1 radio-defaults-1409282-1.patch9.37 KBAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Status: Active » Needs review
FileSize
9.37 KB
Taxoman’s picture

Title: Default values not set on radio fields. » Radio field default values gets reset when re-editing a node (data loss potential).
Priority: Normal » Major