This topic is locked
[SOLVED]

 Copying the printer-friendly totals to another section

11/10/2011 8:20:35 AM
PHPRunner General questions
F
fianchetto author

Dear All,

I have printer-friendly page that include the total of a field,let's say a field "total_weight" automatically created at the bottom of it (as PHPRUNNER normal output). I want to put that value in additional summary paragraph below normal output in that page. For example, I want to put a sentence like this: "The total of weight is: xxx kg". I tried to copy the field in Editor page but it shows empty value. Is there any easy way to do that ? (to copy that value and show it somewhere else in the page?).
thanks

.f

C
cgphp 11/10/2011

In the visual editor switch to HTML mode and add a template var for the extra total value. For example

The total of weight is: {$new_total} Kg



If the name of the field is total_weight, in the "Before display" event enter this code:

$total_copy = $xt->getvar("total_weight_total");

$xt->assign("new_total",$total_copy);
F
fianchetto author 11/11/2011

I really appreciate your help Christian.

Many thanks
.f



In the visual editor switch to HTML mode and add a template var for the extra total value. For example

The total of weight is: {$new_total} Kg



If the name of the field is total_weight, in the "Before display" event enter this code:

$total_copy = $xt->getvar("total_weight_total");

$xt->assign("new_total",$total_copy);