Forums

Can't get form data from 1st pages of multipage form (email)

flodariege 31 Jul, 2014
Hello,
I'm new with Chronoforms, and I'm in trouble with the email that is sent to get data from the multipage form I created.
In the e-mail I receive on submit (the one on the last page), the only data I have is the one from the LAST page.
For all previous page, I have zero data...
For example, on the 1st page, I have checkbox. All I see in the email is "Array".
under the checkbox, I have some text area box. For this I see absolutely no data in the email. All i see is the text of the question (label).
For pages 2 to 4, no date neither, only the text of the questions...
But curiously, for the very last page, the n°5, I get the data.
I checked the code of the e-mail template, it looks OK to me, so I guess I misunderstood something about the SETUP.
Maybe I should put an event that I missed, I don't know.
Here is what I have in my SetUp :
on load
- multipage
- html (render form)

on submit
- multipage
- debugger

on page2
- multipage
- html (render form)

on page3
- multipage
- html (render form)

on page4
- multipage
- html (render form)

on page5
- multipage
- html (render form)

on Merci (that's the name of my thanks message display)
- Email
- Display message

Should I put something like "on submit" for each page, or "handle arrays" or... whatever ????????

Please help me, and please forgive my english, since I'm french😉

My form is here, if ever it can help : http://www.rouchenergies.fr/index.php/a-propos-qui-sommes-nous/l-avis-de-nos-clients/donnez-votre-avis-sur-rouch-energies
GreyHead 31 Jul, 2014
Answer
1 Likes
Hi flodariege,

I think you also need to add the multipage action to the on Merci event, that would explain the missing data,

You probably also need to add a Handle Arrays action before the Email action to convert any multi-answers from arrays to strings.

Bob
flodariege 01 Aug, 2014
Hi Bob,
Thank you so much, it works perfectly now🙂
At firts after I did what you told me, I was getting the data from the last two pages only : the 3 first pages was still missing.
But at least, it was already a lot better since I was seeing the responses for the 4th and 5th pages.
Then I checked, and found that I left "reset data" on YES...
So I put all of them (except the one of the 1st page) on NO, and now everything is OK.
I'm very happy with that because I find your extension so cool : at least I can make a true "questionnaire" for my cutomers.
THANK YOU SOOOO MUCH BOB🙂
GreyHead 01 Aug, 2014
Hi flodariege,

Great to hear that you got it working.

Bob

PS Just a suggestion but when I build a multi-page form I usually plan to add a DB Save after each page (updating the same record each time) so that there is a saved record of the data submitted so far. That way, if something goes wrong later on it is possible to recover the data that has been submitted on the earlier pages.
flodariege 01 Aug, 2014
Great idea, but I'm not sure to know how to perform this…
So far, I did not get the trick about DB saving, for the whole thing I mean, so if you could please tell me how to (or give me a link maybe ?) it would be very helpful🙂
GreyHead 02 Aug, 2014
Hi flodariege,

a) Create a database table for the whole form; the Create table icon will probably do this OK but you will need to check that all the inputs are present and that the column types are appropriate - they default to VARCHAR(255) which can mean that a large form breaks the MySQL maximum size, Also change the name of the primary key column (the first one) from id to cf_id.

b) Add a DB Save on each submit event of the form. After the first one get the cf_id of the new record from the form data (a debugger will help with this); add that value to the form data in a hidden input named cf_id on each of the following pages so that the same record is updated.

Bob
flodariege 02 Aug, 2014

(...)they default to VARCHAR(255) which can mean that a large form breaks the MySQL maximum size,
Bob



Do you mean that if someone makes an answer longer than 255 characters, the questionnaire won't accept it and won't pass onto the next page, or is it that his answer won't be recorded after the 255th character?

PS: I have another problem. Although I asked for a few question to be required, nothing happens if I don't answer and submit. That's strange because at the beginning with this form, this 'validation' was working perfectly fine...
GreyHead 02 Aug, 2014
Hi flodariege,

That wasn't what I meant - though it is also a potential problem You get round that one by setting the column type to TEXT (and remove the 255).

The other problem is that if you have a big form with VARCHAR(255) for all the columns you can pass the total MySQL size limit for a record. From memory that happens with about 80 VARCHAR(255) columns. There's a FAQ about this if you want more info.

Bob
flodariege 03 Aug, 2014
OK, got it thank you 😉
I will check the FAQ if ever I'm in trouble.

I guess you did not see my other question, about validation : is there anything else to do, when I want a field to be required, than say 'yes' on validation tab of the field ?

(Because the validation works perfectly with the last field of my form (which is email), but doesn't work at all for all other fields (on the last page or on previous pages)...)

Thanks in advance🙂
GreyHead 03 Aug, 2014
Hi flodariege,

I looked at the first couple of pages of the form and don't see any validation except for the radio buttons "Avez-vous bénéficié d’aides financières ? *" and that is working OK.

Bob
flodariege 03 Aug, 2014
Yes, thank you Bob, I finally found a solution : when the form is displayed via a menu chronoforms5 link, everything works fine.

Just for info : the trouble was when I used the {chronoforms}form{/chronoforms} tags to put the form inside an article. The form was displayed, but hte validation did not work.
Now everything OK, thank you.
GreyHead 28 Nov, 2014
Hi fabiowilly,

Have you added a Multi Page action to each of the Events in your form?

Bob
fabiowilly 01 Dec, 2014
Hi Bob,

yes, I have.
the multi page event is everywhere.
In "On Load" event "Reset Data" field is set to "on".
Il all the other events is set to "off".
GreyHead 02 Dec, 2014
Hi fabiowilly,

I tested and, as far as I can see the debugger shows all the info on the last page:
Array
(
    [option] => com_chronoforms5
    [chronoform] => TrialETG_2
    [event] => page3
    [Messaggio] => gdgdgdfg
    [text28] => dgdgdg
    [text29] => dgdgdfg
    [captcha] => 
    [button10] => Fine
    [Nome] => Test
    [Cognome] => test
    [Indirizzo] => sfsf
    [Comune] => sfsfs
    [RagioneSociale] => 1223
    [Email] => fsfsf@xxx.com
    [Telefono] => 23424
    [button6] => Continua
    [Prodotto] => BD_SO_OnPremise
    [Postazioni] => 1
    [Fisiche] => 1
    [Hypervisor] => Citrix
    [ServerVirtuali] => 1
    [ClientVirtuali] => 1
    [button8] => Continua
    [ip_address] => 86.214.56.22
)

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

VPS & Email Hosting 20% discount

{item:title} {images:#}