I am trying to figure out what I should use to get the text that was added to a editablecheckboxoption from a submitted for to put it in the email. I can get the integer ID value, but dont know if there is a way in silverstripe to have it use that string to get me the values.
If you look below, $this->{$stringID} gives me the integer ID's seperated by commas of the editablecheckboxoption. I am missing something and not sure what.
if ( $field instanceof EditableCheckboxGroupField)
{
//get the unique id from a string stored in the field
$stringID = $field->Name;
$values = array();
$values['Key'] = $field->Title;
//load the value from this object using the unique string id from before
$values['Value'] = $this->{$stringID};
$set->push(
new ArrayData($values)
);
}