if ($value == 'choice1') {
// do x
} elseif ($value == 'choice2') {
// do y
}
This won’t work because the button group values are created dynamically from the options page and therefore the values cannot be known beforehand. I’m started to think it’s not possible because there isn’t any example found anywhere. This question was also never answered properly with code.