Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi
I am using the following to render a field :
$field = field_get_items('node', $proposal_node, 'field_working_title_of_award');
$field_working_title_of_award_value = field_view_value('node', $proposal_node, 'field_working_title_of_award', $field[0]);
drupal_render($field_working_title_of_award_value);
However this bypasses the empty field settings on that field. Is there a way to programmatically deliver the field with the appropriate empty text returned if appropriate ?
Thanks
Comments
Comment #1
Alan D. CreditAttribution: Alan D. commentedA fully integrated method is a bit involved.
So if the field is empty, you can either manually update the output in the template or integrate via (untested):
Reopen if you have any issues. Personally, I would just manually insert the empty text unless it is important to link to the view display settings
Comment #2.0
(not verified) CreditAttribution: commentedmissing word