Closed (fixed)
Project:
Webform
Version:
7.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Jun 2012 at 19:11 UTC
Updated:
4 Jan 2014 at 02:05 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
quicksketchI've noticed this problem too. Thanks for opening an official issue.
Comment #2
fenstratAttached patch fixes reordering not working.
Comment #3
quicksketchThanks @fenstrat! The code went through a few iterations where order was not relevant which is how we ended up in this situation. I'll review the patch when I get a chance.
Comment #4
fenstratNo worries @quicksketch, look forward to the review.
Comment #5
fenstratUpdate to #2 which used the incorrect $rgid.
I've also noticed form validation "illegal choice detected" errors when there's more than 20 conditions (i.e. more than the default $delta of 10) when deleting many conditions at one time. Unsure of the best way to get around that, but the rest is working well.
Comment #6
quicksketchThat's probably caused by the number of elements influencing the available values in the weight field. If there were once 15 conditionals and one of the conditionals had a weight defined of "-12", the -12 option wouldn't exist any more if you removed 5 conditionals. So Drupal throws an error because the default value was set to something that doesn't exist.
I modified your patch slightly to keep track of the "max" number of conditionals that have been used and always uses that $delta for the weight field. Seems to pass all my testing but another look would be appreciated. In the mean time I've committed this to the 4.x branch. Thanks!
Comment #7
fenstratYep, you're spot on with your reasoning for the "illegal choice detected" @quicksketch. Nice work around. Tested, works well.