Normally empty fields do not display in drupal, but drealty fields display the labels of empty fields. Do I need to write a hook_entity_presave function for each field to unset it if it's empty?

Comments

camidoo’s picture

Actually this patch should address that issue and hide the empty fields, just haven't had time to get it tested and committed.

http://drupal.org/node/1492264#comment-5925872

camidoo’s picture

Status: Active » Closed (fixed)

this should be fixed by this issue #1492264: Undefined index during drush

bloomt’s picture

I also need to figure out how to hide the fields that do not have any data in them, I have looked at the other thread but have not found anything that will remove these fields for me. Any help would be greatly appreciated!

bloomt’s picture

I also need to figure out how to hide the fields that do not have any data in them, I have looked at the other thread but have not found anything that will remove these fields for me. Any help would be greatly appreciated!

bloomt’s picture

If I click on the listing and hit edit and then save it then all the blank fields disappear...

jday’s picture

That would not be a plausible fix for a site with 10K listings. I ended up creating custom templates for the listing nodes that check if the field has a value before printing it.

bloomt’s picture

Issue summary: View changes

Is anyone else still having this issue?

bloomt’s picture

I ended up using jquery to hide the field