Nice work, and interesting use case for remote data !
A couple remarks :
- you probably want to add a dedicated index on 'rating' for sorting in Views
- ctr_field_text_widget_validate() :
You can probably replace this :
$delta = $element['#delta']; // TODO: Isn't there a better way to find out which element?
$field = $form_state['field'][$element['#field_name']][$element['#language']]['field'];
$field_name = $field['field_name'];
if (isset($form_state['values'][$field_name][$element['#language']][$delta])) {
$values = $form_state['values'][$field_name][$element['#language']][$delta];
...
with
$value = $element['#value'];
- About refreshing on cron : would probably be easier if the 'update_on_cron' setting was field-level instead of instance-level (plus I'm not sure there's an actual use case)
Comments
Comment #1
tim.plunkettAddressed the validation part. This will make #1134726: Option to allow numeric values that don't have ratings to validate easier.
Comment #2
tim.plunkettBahhh!
Comment #3
tim.plunkettMy issue queue skills are escaping me today.
Comment #4
sheise commentedTested
Comment #5
tim.plunketthttp://drupalcode.org/project/ctr_field.git/commit/8181c36