How can I unset a view field based on value of some other field in the same view ? I cant use views php module ? Is there any other option for it?

1 Answer 1


use hook_view_pre_render and in this, you need to check for that value in if condition...

  • your answer is right but what I want to place the condition using the views UI .Is there anyway I can do by changing something in the edit view itself ?
    – harshal
    Commented Sep 3, 2013 at 6:53
  • if you are willing to do so, there is i think only one way ie to inject php code in views but i dont prefer this because site is too buggy and hacker will take advantage of this one. :) Commented Sep 3, 2013 at 7:02
  • Actually I have added a global custom text field and I am unable to alter the html of that field in the template.php file using theme_name_process_views_view_field(&$vars). So I tried directly inserting html into text field of 'edit view' .Can u tell me how to insert html into global custom text field which is fields['nothing'] ?
    – harshal
    Commented Sep 3, 2013 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.