data array is not properly returned to the action.Is there a setting I have overlooked? Curly brackets are enabled in the Show HTML action and when echoing $form->data['cfu_email'], the email address is shown correctly."> Problem with Email [GH] - Forums

Forums

Problem with Email [GH]

MichielStr 14 Sep, 2012
Bob,

I am having difficulties with the curly brackets in your Email [GH] action. When adding for example {cfu_email} to the TO-field, no email is being sent. When adding that same variable to the subject field (entering a 'standard' email address in the TO-field), the subject in my email-client shows "{cfu_email}".

Only variables that are passed via the URL (?variable=value) can be used and are properly returned. Looks like the content of the $form->data array is not properly returned to the action.

Is there a setting I have overlooked? Curly brackets are enabled in the Show HTML action and when echoing $form->data['cfu_email'], the email address is shown correctly.
GreyHead 14 Sep, 2012
Hi MichielStr,

I haven't heard of any problems with this before your post.

Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.

Note: if you are using the Easy Wizard you may need to switch to the Advanced Wizard to do this; if you want to continue to use the Easy Wizard please make a copy of your form first and add the Debugger action to the copy.

Bob
MichielStr 14 Sep, 2012
Hi Bob,

The problem is, that the Debugger seems to ignore the Redirect URL and a submit (therefore?) results in a blank page when the Debugger is enabled... So I cannot see the results of the email action.

Do you know of an alternative way of outputting the debug data?

Brgds,

Michiel
GreyHead 14 Sep, 2012
Hi MichielStr,

Hmmm . . .the Debugger should still show with a link to the Redirect URL

By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.

Bob
GreyHead 14 Sep, 2012
Hi MichielStr,

You are setting up cfu_email in the On Load event and adding it to the form data but you aren't passing it to the On Submit event as far as I can see so it isn't available there.

You can put a copy of the Get User Info [GH] action in the On Submit event or pass the data using the User Session or a hidden input - any of those should work OK.

Bob

PS I added a Debugger action and it seemed to work OK.
MichielStr 14 Sep, 2012
Oops! I never realised I had to call that action in the OnSubmit event as well. My queries worked correctly, so I assumed the form->data array was available throughout the form. Now I realise those queries work because I redirect to the same form and the Data to Session and Session to Data take care of re-filling the arrays. Right?

Adding the action to OnSubmit fixed the issue. Thanks so much again!

Michiel
GreyHead 15 Sep, 2012
Hi Michiel,

You are correct, passing the form data through the session allows it to be republished.

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