Forums

Use field value in php

webcrea 29 Apr, 2015
Hello,

In admin edit, I try to use a value of the field

<?php
$image = $form->data['Honor']['image'];
echo "image = " . $image;
?>

model is Honor and the field text is image with a name of the image in

I have

image=NULL

the value appears correctly in html with {Honor.image}

an idea please?
thanks
chris
GreyHead 29 Apr, 2015
Answer
Hi chris,

In CC please use $row instead of $form->data. So I think that it is $row['Honor']['image']

Bob
webcrea 29 Apr, 2015
Nice
thank you Bob
This topic is locked and no more replies can be posted.