Forums

V4 - Simple 2 page form - passing data problem

PJMFD 04 Nov, 2011
I need a simple multi page (2 page) form.

Due to limited space, the first page will just have 2 fields - Name (input_textarea_0) and Email address (input_textarea_1) along with a submit button.

Both are being validated and then on submit I have set :
session to data - with a session key of getInTouch
Redirect to second form

On the second form I only have a captcha set up along with a submit button.
I have set the OnLoad - data to session with session key getInTouch

The On submit includes :
Session to Data - with session key getInTouch
Email to me with template :
<table cellpadding="0" cellspacing="0" border="0">
	<tr>
<td>
			Name
		</td>
		<td>
			{input_textarea_0}
		</td>
	</tr>
	<tr>
		<td>
			Email
		</td>
		<td>
			{input_textarea_1}
		</td>
	</tr>
</table>



Email comes through fine but just lists the field names instead of the data I was expecting.

As I am new to this data handling, I am sure I have missed something somewhere and probably over simplified the process!
GreyHead 04 Nov, 2011
Hi PJMFD ,

I'm finding it a bit hard to follow the flow here. Why do you need the Data to Session on the second form ON Load; it looks as though you want the data in the OnSubmit event to include in the Email?

Bob

PS I'm also curous why you are using textareas for Name and Email inputs?
PJMFD 05 Nov, 2011
Hi Bob

Thanks for the reply.
I think the odd flow is probably down to a lack of understanding on my part!
As for text area rather than field - well thats me throwing the test form together very quickly and not realising I have used textArea rather than field - so apologies for the confusion!

I was trying to follow another post and info you gave to another user.

I have now amended to text fields!

I have removed the Data session on the second form on Load and put data to session in the OnSubmit event.

Have tested it but the email still comes back with the (amended!) text fields names and not the data.

I know this is down to me.
As they say, a little knowledge is very dangerous!

Many Thanks
Peter
GreyHead 05 Nov, 2011
Hi Peter,

Please take a Form Backup (of both forms) using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look.

Bob
PJMFD 15 Nov, 2011
Hi Bob
Have you had any thoughts on how to get this working for me.
I did PM the forms across for you to take a look at.

Many Thanks
GreyHead 16 Nov, 2011
Hi Peter,

I apologise for being so slow in looking at these forms.

I don't see either a Data to Session or a Session to Data action in either form. There is a DB Save action in one and a DB Multi Record Loader in the second.

(You could use this approach and save the data to a table in between forms but then you'd need the DB Record Loader in the second form as you only want to re-load one record.)

Here's how to do it with the Data to Session actions.

In the first form 'datos_basicos' drag a Data to Session action (from the Session Data group of actions) into the On Submit event. Click the center icon on the action to configure it and put datos_basicos into the Session Key box. (Remove the Show HTML action as this does nothing useful there.)

In the second form 'prueba_edicion' drag a Session to Data action into the on Load event. Configure that with the same session key.

That's it.

Bob
PJMFD 24 Nov, 2011
Hi Bob

Got it all sorted now. Many thanks.

I basically had the "Data to Session" and "Session to Data" the wrong way round in the forms!
By placing the "Data to Session" in the first form and "Session to Data" in the second form I got things working.

As I always thought - user incompetence!

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