This topic is locked
[SOLVED]

 How to add empty tabfield

10/10/2013 4:58:01 AM
PHPRunner General questions
M
mmponline author

I have tabs setup on view page. I have fields on this page that must NOT display when the field has no value. I tried to use

if (!$values["PHYSICAL_ADDRESS_1"])

$xt->assign("PHYSICAL_ADDRESS_1_tabfieldblock",false); (tab added to fieldblock used on normal view page)
The field is now hidden whether it has a value in or not.

How can I fix it to only hide when empty?

C
cgphp 10/10/2013
if(empty($values["PHYSICAL_ADDRESS_1"]))

$xt->assign("PHYSICAL_ADDRESS_1_tabfieldblock",false);
M
mmponline author 10/10/2013

No. After further investigation, I see that both codes hide the fields whether there is content in it or not. In other words it always hides the blockcontent, no matter if it's empty or not. It does it on the main view page and in the tabs.

M
mmponline author 10/11/2013

I've just upgraded to version 7. Here is a function to hide all empty fields on the view page with one click. Fantastic! Good work PHPRunner team! This will save ages with large tables and lots of potential empty fields. I'm working on a large project and this "tick" paid for upgrade as I would have spent hours setting up events!
If you consider upgrading to v7.

Stop considering, do it!
Thank you for a great product!