1779 Posts in 582 Topics by 556 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 627 Views |
-
Custom Field question

21 April 2010 at 3:38am
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)
);
}
| 627 Views | ||
|
Page:
1
|
Go to Top |

