This topic is locked
[SOLVED]

 Hide field if vale is zero

5/29/2020 4:26:32 AM
PHPRunner General questions
W
wypman author

I have seen the facility to hide empty fields from view in the Page View settings -> Hide Empty Fields, but is there a way of hiding a field if the value is zero?
I have tried adding code in the Javascript onload event, but if you have several if commands it noticeably slows down the page loading.

var ctrl_age_years = Runner.getControl(pageid, 'age_years');

if (ctrl_age_years.getValue()==0)

pageObj.hideField("age_years");


Is there another way?

Sergey Kornilov admin 5/29/2020
W
wypman author 5/30/2020

That works!
Thanks