form_set_error supposedly takes the name of the offending form element as the first param.
I have a form element that is named "field_reviewer_terms_of_service[value]" (as taken from firebug). My code that sets the error is:
form_set_error('field_reviewer_terms_of_service[value]', t('You must agree to the Terms of Service.'));
The error shows up in the messages, but doesn't highlight the form element itself. What am I doing wrong?
Edited with HTML of form element:
<div id="edit-field-applicant-terms-of-service-value-wrapper" class="form-item"> <label for="edit-field-applicant-terms-of-service-value" class="option"><input type="checkbox" class="form-checkbox required error" value="1" id="edit-field-applicant-terms-of-service-value" name="field_applicant_terms_of_service[value]"> I agree to the <a href="/terms_of_service" target="_blank">Terms of Service</a></label> </div>