Forums

How to get the value of the form?

yuna_1109 13 Nov, 2013
I would like to get the value of the form(eg: a label text - field name: test_label). But I don't know how to get the value on the events, and I am using the custom code. Is that just easy to do it?😟 😟 😟 😟 😟
yuna_1109 13 Nov, 2013
When I use the following code in the custom code, it's not work.
Is anything wrong? "$Donation" is the form name and the "Donation2" is the label text field name.
Thanks!!

<script>
function getValue()
  {


    var x = $Donation->data['Donation2'];
  alert(x);
  }
</script>

<body onload="getValue()">
GreyHead 13 Nov, 2013
Hi yuna_1109,

That's a mixed up mess of PHP and JavaScript. What do you actually need to do?

Bob

PS $form->data stays as $form->data not $Donation->data.
valisasu 20 Nov, 2013

Hi yuna_1109,

That's a mixed up mess of PHP and JavaScript. What do you actually need to do?

Bob

PS $form->data stays as $form->data not $Donation->data.




Hello,

maybe he should try rename one of the fields ?

There is no problem if the form name and the label text field name are almost similar ?
This topic is locked and no more replies can be posted.