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)

CommentFileSizeAuthor
#2 ctr_field-1033850-1.patch1.58 KBtim.plunkett

Comments

tim.plunkett’s picture

Addressed the validation part. This will make #1134726: Option to allow numeric values that don't have ratings to validate easier.

tim.plunkett’s picture

StatusFileSize
new1.58 KB

Bahhh!

tim.plunkett’s picture

Status: Active » Needs review

My issue queue skills are escaping me today.

sheise’s picture

Status: Needs review » Reviewed & tested by the community

Tested

tim.plunkett’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.