data['garancia']=$_GET["g"];$form->data['aweber']=$_GET["awe"];?>The form fields are hidden fields that are the same as the DB columns. The GET parameters are exactly the same as I get from the URL. But the only strange thing is that one "g" gets stored in the DB, awe and price is not. I tried with all of them, only one of them, two at the same time, but nothing...I also tried to delete custom code, recreate it, delete table, regenerate it, still nothing...My URL looks like this:www.domain.com/?uid=35cf098cc4201ddb37678e2a7e1f41b6&price=123&g=1&awe=1No matter what I do, only "g" gets saved and no matter the order in the URL. Any idea?Should I recreate the whole form because it got messed up, or what?thanks,Guillome"> Can't get custom code to work:( - Forums

Forums

Can't get custom code to work:(

guillome 15 Apr, 2015
Hello,

I have got custom code before DB save:

<?php
$form->data['ar']=$_GET["price"];
$form->data['garancia']=$_GET["g"];
$form->data['aweber']=$_GET["awe"];
?>

The form fields are hidden fields that are the same as the DB columns. The GET parameters are exactly the same as I get from the URL. But the only strange thing is that one "g" gets stored in the DB, awe and price is not. I tried with all of them, only one of them, two at the same time, but nothing...

I also tried to delete custom code, recreate it, delete table, regenerate it, still nothing...

My URL looks like this:

www.domain.com/?uid=35cf098cc4201ddb37678e2a7e1f41b6&price=123&g=1&awe=1

No matter what I do, only "g" gets saved and no matter the order in the URL. Any idea?

Should I recreate the whole form because it got messed up, or what?

thanks,
Guillome
GreyHead 17 Apr, 2015
Hi Guillome,

The URL data is available when the form Loads, not when it submits (it's a different URL then).

To pass this through add three hidden inputs to your form with names 'price', 'g' and 'awe'

Then change your custom code to
<?php
$form->data['ar'] = $form->data['price'];
$form->data['aweber'] = $form->data['awe'];
?>

Bob
This topic is locked and no more replies can be posted.