I'd like something pretty simple (I think) - just hide a field if it's empty. I can hide a field with this module, but it has to check a different target field. Is it possible to just check a field against itself? The Field Conditions module has the same requirement of checking a field against another field. I can't find any module to hide a field if it is empty. Would it be difficult to add the functionality to this module?
I know hiding a field if it's empty can be done with Views, but we need to not use Views to display this content for a specific reason (it has to do with Workbench and drafts).
Comment | File | Size | Author |
---|---|---|---|
#3 | check_field_against_self-2227543-3.patch | 974 bytes | Aunion |
Comments
Comment #1
mikez93 CreditAttribution: mikez93 commentedI could use this as well.
Comment #2
vokabuka CreditAttribution: vokabuka commented+1 subscribing
Comment #3
Aunion CreditAttribution: Aunion commentedThere's actually a variable in the code that decides if the source should be listed among possible targets or not (see line 139 of ffc.ffc_conditions_info.inc). I made a small patch which overrides this (probably not the correct way of doing this, but it was a quick fix), attaching it if someone needs said quick fix.
Comment #4
killingismybusiness CreditAttribution: killingismybusiness as a volunteer commentedFirstly i commented in ffc.ffc_conditions_info.inc strings
in two places, and then searched for and found this issue.
For performance better to edit or make patch for mentioned file.
P. S.
I installed this module because field formatting module did not hide label for empty fields.
Comment #5
alibama CreditAttribution: alibama as a volunteer commented#3 doesn't seem to hide the labels... not sure what to do there.....