use of variables on custom list header box

Use variables in the header box of a custom list in ChronoForms.

Overview

The issue occurs because variables defined in the header box are not accessible or printed correctly, unlike in the body box where they work.
To resolve this, ensure you define and initialize any necessary global variables in the header box before the list action runs, and verify the variable scope matches your usage in the body and footer sections.

Answered
teldrive teldrive 21 Sep, 2014
I apreciate if you can help me, let me know if posible to use variables on header box of a custom list
I am tried but never got it printed on screen
<?php
echo $row['model1']['field'];
?>
<a>{model1.field}

In body box I have a model1.field and model2.field, i can print them
teldrive teldrive 21 Sep, 2014
Answer
i dont know if i did right but it Works

HEADER BOX
<?php
 global $row_counter;
global $sesiones;
$row_counter=1;
 ?>

BODY BOX

<?php
$sesiones=$row['moder']['sesiones'];
?>

FOOTER BOX
<?php
$this->view->Toolbar->addButton("toolbar-button-cancel","/es/component/chronoconnectivity5/?cont=lists&ccname=moder_paper_list&act=list&gcb=".$sesiones,"LISTADO SESIONES", "/libraries/cegcore/assets/images/toolbar/settings.png","link"); 
in inocampo 02 Dec, 2014
Hi

Thank you for this examples, how I can call a PHP function before run action list?
This topic is locked and no more replies can be posted.