Buy Now
Sign in

i cannot get any data from textbox

samir1903 , November 04 2018
S
samir1903 170
November 04 2018 #381251
custom code
<?php
$form->data['total']=$form->data['field1']+$form->data['field2'];
?>
debug
Array
(
[option] => com_chronoforms5
[chronoform] => deneme
[event] => submit
[field1] => 1
[field2] => 2
[total] => 0
[button4] => Submit
)
why can i not get any value from field???
GreyHead 63.5
November 04 2018 #381255
Hi samir1903 ,
The PHP looks OK for CFV5. If you test with just $form->data['total'] = '999'; does that work?
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
S
samir1903 170
November 04 2018 #381256
yest it works
GreyHead 63.5
November 04 2018 #381257
Hi samir1903,
Hmm that's odd - the full expression should also work.
Please take a Form Backup using the icon in the Forms Manager and post it here and I'll take a closer look.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
healyhatman 6.1
November 04 2018 #381259
$fieldvalue = $this->data("fieldname", "default if empty");
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman

You can now copy+paste code from forums