Works perfect unless two or more options share the same Value, then the code copies the option name to the other options. so if product option 1 is name: blue value:yellow and option 2 is name:red value:yellow the all_fields will be list them as “productname: red, yellow” for both. seems it grabs the last option name and uses that for all option names with the same value.
Gravity Forms requires choices to have unique values. This is because it is the value that is saved in settings and the entry. You’ll need to update the choice values to make them unique.