use variable in 2 different custom code

federcla 05 Dec, 2012
hi,
i have a question

i can call a variabile in 2 different Custom Code Action?

tks
GreyHead 05 Dec, 2012
Hi federcla ,

Yes, the simplest way is to add it to the ChronoForms $form->data[''] array and then it will be available in to the form and to all actions.

Bob
federcla 06 Dec, 2012
I use $ form-> data [''] to get the values ​​from the form fields, I can use it to pass an array to a custom code to another?

my $ array = G

example: $ form-> data ['$ g']

I do not have to pass a key value?

tks
GreyHead 06 Dec, 2012
HI federcla,

You'd use it like this:
<?php
$form->data['some_key'] = $g;
?>

In another, later action you can either reference $form->data['some_key'] or {some_key} depending on the context.

Bob
federcla 06 Dec, 2012
thank you very much bob, your help has been very valuable
This topic is locked and no more replies can be posted.