Keyword

Hide extra field if value is empty

  • Nick
  • Nick's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 2 months ago #71694 by Nick
It would be great if an empty field would be hidden if it's value output is empty. I coded something myself which hides an extra field if the value is empty but it only seems to work with single box fields (text box) as it has only 1 value. Links for example have 3 values and will not hide for a retarded reason. Could JoomlaWorks send me a code snippet that would hide ANY extra field if the value output echoe's as empty. I can't seem to figure it out...
I keep pushing this for the 3rd time. Not because i'm an asshole, but because Joomlaworks doesn't even reply to 90% of the posts in their forums. Now that is just stupid.

I believe that this will make extra fields SO MUCH more usefull, and it gets rid of the group's. I hate them.

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

  • Nick
  • Nick's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 2 months ago #71695 by Nick
Replied by Nick on topic Hide extra field if value is empty
BUMPING THIS. WHERE ARE THE DEVS?

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

  • Anthony Antonellis
  • Anthony Antonellis's Avatar
  • Offline
  • Junior Member
More
15 years 2 months ago #71696 by Anthony Antonellis
Replied by Anthony Antonellis on topic Hide extra field if value is empty
i managed to hide the empty fields, it took a little reworking of the css and the template but its definitely doable. it works in everything so far, except the beloved ie6.

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

  • Nick
  • Nick's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 2 months ago #71697 by Nick
Replied by Nick on topic Hide extra field if value is empty
omfg how did you do that!!!! omfg omfg omfg please tell me! This way i might be able to perfect it with some php and make it work in ie6 :O

Anthony Antonellis said:i managed to hide the empty fields, it took a little reworking of the css and the template but its definitely doable. it works in everything so far, except the beloved ie6.

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

  • Francisco Ferreira
  • Francisco Ferreira's Avatar
  • Offline
  • Junior Member
More
15 years 1 month ago #71698 by Francisco Ferreira
Replied by Francisco Ferreira on topic Hide extra field if value is empty
Hi Anthony,

Can you share your solution with us?

Many thanks in advance,

Francis

Anthony Antonellis said:i managed to hide the empty fields, it took a little reworking of the css and the template but its definitely doable. it works in everything so far, except the beloved ie6.

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

More
15 years 1 month ago #71699 by Jiliko.net
Replied by Jiliko.net on topic Hide extra field if value is empty
Hi everyone,

here's my solution to hide the fields with empty value :

I've added some code to the div that displays ExtraFields in my own item.php k2 template file.
Here's the code of my div...

Hope it will help...
Attachments:

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

  • Nick
  • Nick's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 1 month ago #71700 by Nick
Replied by Nick on topic Hide extra field if value is empty
Bravo... that's all i can say. It fucking worked.

Here are some issues tho, not a problem but just pointing it out.

The field ONLY disappears when the link area contains http:// that's the only case. It even disappears when the description area has text in it. If the link part contains http:// the field will disappear, no matter what. It's cool tho! Thanks a lot!

I think i just jizzed in my pants.

Olivier Nolbert said:Hi everyone,
here's my solution to hide the fields with empty value :

I've added some code to the div that displays ExtraFields in my own item.php k2 template file.
Here's the code of my div...

Hope it will help...

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

  • Francisco Ferreira
  • Francisco Ferreira's Avatar
  • Offline
  • Junior Member
More
15 years 4 weeks ago #71701 by Francisco Ferreira
Replied by Francisco Ferreira on topic Hide extra field if value is empty
It Works!!!!! It works!!!! Alleluia, praise the lord ;-)...

You just saved my life man!!!

Many thanks for a great job!!!

Olivier Nolbert said:Hi everyone,
here's my solution to hide the fields with empty value :

I've added some code to the div that displays ExtraFields in my own item.php k2 template file.
Here's the code of my div...

Hope it will help...

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

More
14 years 10 months ago #71702 by Jason Noel
Replied by Jason Noel on topic Hide extra field if value is empty
Wow... Thanks a lot!!!! This works perfectly!

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

More
14 years 8 months ago #71703 by Cheche
Replied by Cheche on topic Hide extra field if value is empty
Nolbert,

Thank you so much for providing this code. Well thought out solution and works just like it should. You saved me from having to program my own solution and I can't thank you enough.

This should definitely be added to the K2 core.

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


Powered by Kunena Forum