I want to set a pre-defined variable ($variable_added) to a value that I extract from a webform submission.

The webform submission is available in the variable $data.

I made an action "Excute custom php code" with the next line:

$variable_added = $data['components']['thuis_doelpunten']['value'][0];

It appears that $variable_added did not get the value that is present in the component on the right hand side.

Do I have to actively save the new value in some way?

Thanks

Comments

Goofy2k’s picture

Component: Rules Engine » Miscellaneous
webroru’s picture

I would like to know too.

Isostar’s picture

I also have the same question.
I want to use the PHP code to fire a custom function that calculates a variable. The logic is to extensive to include it in rules.
That variable should be returned to rules.

mitchell’s picture

Status: Active » Closed (duplicate)
mitchell’s picture

Component: Miscellaneous » Rules Core

Updated component.