Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

CB File Field Plugin - Hide field and tabs when there is no file

11 years 4 months ago #232200 by harleylever
Hello, I am using the CB File Field Plugin and Community Builder 1.9. I have the "Show Empty Tabs" and "Show Empty Fields" set to "No", which worked perfectly until I installed the CB File Field Plugin. Now most fields and tabs are being displayed, even when there is no file associated with a field. We do not want the user to be able to upload anything. We are simply using the plugin to make some, not all, documents available to them and would like to hide both the fields and tabs that do not have documents.

I am assuming this is happening because the field, by default, is filled with a value.

How can I fix this to only show the CB File Fields that have a file associated with them and completely hide the fields and tabs with no files associated with them?

Thank you for your time.

Please Log in or Create an account to join the conversation.

11 years 4 months ago #232421 by harleylever
Hello? Can anyone answer this please? I need to get this straightened out ASAP.

Thanks,

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
11 years 4 months ago #232429 by nant
try marking the relevant file fields as read only - see if that works for you.

Please Log in or Create an account to join the conversation.

11 years 4 months ago #232461 by harleylever
Hi Nant, Thank you so much for your reply. I had already tried making them read only. The problem is when the field is not occupied by a file the plugin puts in a "none.png" and a "Right-click to download file" link. I believe this interferes with the "Show empty tabs" and "Show empty fields" settings because the plugin seems to automatically place the none.png file and the download script in the field when there is no file present.

I am assuming the fix is to stop the plugin from placing the none.png and script in the field, but I am not sure how to accomplish that.

Hope this helps.

Thanks again for your time Nant.

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
11 years 4 months ago #232480 by nant

harleylever wrote: Hi Nant, Thank you so much for your reply. I had already tried making them read only. The problem is when the field is not occupied by a file the plugin puts in a "none.png" and a "Right-click to download file" link. I believe this interferes with the "Show empty tabs" and "Show empty fields" settings because the plugin seems to automatically place the none.png file and the download script in the field when there is no file present.

I am assuming the fix is to stop the plugin from placing the none.png and script in the field, but I am not sure how to accomplish that.

Hope this helps.

Thanks again for your time Nant.


The plugin is an Ajax file upload field - it is always meant to allow frontend uploads directly from profile - that how it is designed.

Suggest you put all your file fields in another tab to work around this.

Working as designed imo.

Please Log in or Create an account to join the conversation.

11 years 3 months ago #232600 by harleylever
Hi Nant,

While I agree that it works as designed, the design conflicts with a feature that is inherent to all other field types in Community Builder. I paid for the file field plugin assuming it would work exactly like all other fields and would be able to be hidden if the file field and/or tab were empty... this is how every other field-type works. So why would I assume a file field would not work the same exact way as the other fields?

For this use we are listing dozens of files in a series of categories (tabs). The user will never have all of the files in each category but we want them to be able to only view and download the ones they have.

Is there not a way to substitute the value of "none.png and the download script" found in the file field plugin for the same value that allows all of the other field types to be hidden when not filled?

Again, thank you for your time.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum