I open the form using a "token" with the cf_uid of a record because the wizard should update 2 fields of the record.
I setup the form as per FAQ and I thought it worked.
After changing a field name of an element the problem started.
I put a Debugger in every step of the wizard.
In the Debugger I see a value for both the old and the new field name. I mean The field name of the element was myfield and I changed it to newfield.
In the debugger I see:
Array
(
[myfield] => abc
[newfield] => def
...
The value of another element is wrong. The element is a simple Radio box with 2 values allowed, no Field Name and Field ID = "a_name".
I suppose I'm missing something of the inner working of Multi Page.
I just wanted the user to check some radio box and let the cf_id of a record to be updated "follow" the wizard. And on the submit action I wanted to set a field name based on the values selected by the user and update the record.
But now I can't trust the debugger or CF. 😟
On the onsubmit action I added a Custom Event Switcher that checks the value of a radio box in the 1st page of the wizard.
$ret='fail';
if(isset($form->data['a_name']) && $form->data['a_name']=='cancel')
{
$ret = 'cancel';
$form->data['status'] = -2;
}
else if (isset($form->data['a_name']) && $form->data['a_name']=='postpone')
{
$ret = 'postpone';
$form->data['status'] = -1;
}
unset($form->data['a_name']);
return($ret);
If I select 'postpone' in the 1st page of the wizard, the action associated to 'cancel' runs!
And the debugger confirms that the value that gets to the submit page is 'cancel'.
I'm a little bit confused.
Thank you
maxx