I want customers to rate a product from 1-4. I've made a form with a SelectionGroup containing 4 SelectionGroup_Item fields. I'm trying to validate if the customer has made a selection. Server-side it seems to work, the form only goes through when an option is selected. But no error-message is shown if none are selected, so the customer is left in the dark as to why their form wasn't sent.
Any ideas? Thanks very much!
$gradeBoxes = array(
new SelectionGroup_Item($this->Note4, '', $this->Note4),
new SelectionGroup_Item($this->Note3, '', $this->Note3),
new SelectionGroup_Item($this->Note2, '', $this->Note2),
new SelectionGroup_Item($this->Note1, '', $this->Note1),
);
$gradeField = new SelectionGroup('Grade', $gradeBoxes);
$gradeField->setCustomValidationMessage('Please select one.');
$fields->push($gradeField);
$required = new RequiredFields(array('Grade'));
$form = new Form($this, 'FeedbackForm', $fields, $actions, $required);