Add new comment

I've been researching and trying to figure out how to do this for 2 days. Something as simple as hiding (unsetting) a view global text field based on the value of another field in the row in a module (not with theming) should not be this difficult.

Because it's a global text field the usual hooks (pre_render, post_execute, etc) are useless. The easy way is to enable the php filter module and use the views_php filter-- but that's not acceptable for all sorts of reasons. Using your code above, i was able to simply unset it in the $rendered_result array-- basically 3 lines of code. brilliant!

Thanks!

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.