This topic is locked

Hide field if is empty in multi row list page

3/27/2023 12:46:17 PM
PHPRunner Tips and Tricks
technoserv author

In my project I have put a list page with grid-type advanced 2 columns in which each record is displayed on multiple lines.
I tried setting the "hide if empty" flag but nothing happens.
I tried putting event in in "after record is processed" and also in "before display"
inserting the following code:
if (!$data["date_repl"]){
} else {
The result is that the field and its contents are displayed on all rows, even where the condition is applied.
I also tried in "javascript onload event" with the following code:
var ctrldaterepl = Runner.getControl(pageid, 'date_repl');
if(ctrldaterepl.getValue() == ''){
result field always visible on all lines.
From what I understand it is only a problem on the list page with multi row grids as they work on a normal list page.
Can anyone help me? Thank you.

KM 7/30/2023

I am using PHPRunner
<ol> Set list page grid layout to vertical. On List Page After Record Processed event add the code below:
</ol>`if ($data["YourFieldName"] == "") {

$record["YourFieldName_fieldcolumn"] = false;

} else {

$record["YourFieldName_fieldcolumn"] = true;