2

One way is to use $node->field_myfield[LANG][0][value]="value" that needs another line for getting field's language using field_language().

Is there an easier and cleaner way?

1 Answer 1

6

You should use the field_view_field() function. Have a look at Rendering Drupal 7 fields (the right way).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.