Hello there,
I am trying to access the row data variable for using in php (number_format...)
<?php
$fPrice = number_format($this->data['Fahrzeug']['price'], 2, ",", ".");
?>
In some examples I have seen the usage of
When I am in the list view, it works, when I use
But when I am in the Front list > List display > Body code none of these work!
How can I access the row data from within php in the code box?
Please give me a hint,
Anne
I am trying to access the row data variable for using in php (number_format...)
<?php
$fPrice = number_format($this->data['Fahrzeug']['price'], 2, ",", ".");
?>
In some examples I have seen the usage of
$form->data['ModelID]['fieldname']
.
When I am in the list view, it works, when I use
$this->data['ModelID]['fieldname']
.
But when I am in the Front list > List display > Body code none of these work!
How can I access the row data from within php in the code box?
Please give me a hint,
Anne
Hello anne1979,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
My form data isn't saving to the database correctly
My CFv5 form data isn't saving to the database correctly
How do I save form data to a database table?
How to load record data from a database table into your form
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
My form data isn't saving to the database correctly
My CFv5 form data isn't saving to the database correctly
How do I save form data to a database table?
How to load record data from a database table into your form
P.S: I'm just an automated service😉
Well, I found a solution / workaround for this by using the PHP Box with the line
in combination with the normal field output in the Front List > List display > Custom > Body Code Box...
Again, the used field (Fahrzeug.price) has to be added to the Columns List Box above as well to be processed.
Have a nice evening y'all,
Anne
Fahrzeug.price:return number_format($row['Fahrzeug']['price'], 2, ",", ".");
in combination with the normal field output in the Front List > List display > Custom > Body Code Box...
Again, the used field (Fahrzeug.price) has to be added to the Columns List Box above as well to be processed.
Have a nice evening y'all,
Anne
This topic is locked and no more replies can be posted.