Buy Now
Sign in

Help with Multipage DB save as well as Multiplier DB save

Elitakey , May 24 2017, 18:00
E
Elitakey 282
May 24 2017, 18:00 #368569
Hello, have to admit that I am struggling for a long time with DB save actions for Multi page form.. so I need professional help to take a look at my form:
1. I created a form with 5 pages;
2. Each page has cf_id hidden field to pass the record ID throughout the form;
3. On the first page (On load event after HTML (render form)) I have custom code with following code:

<?php $form->data['atskaite']['cf_id'] ?> - to get the cf_id
and
<?php $form->data['cf_id'] = $form->data['atskaite']['cf_id'];?> - to assign that to the hidden field

4. On the folloving pages (page 2 event .... etc) i have DB save with the custom code that follows containing
<?php $form->data['cf_id'] = $form->data['atskaite']['cf_id'];?>

Unfortunately, debugger shows that by changing pages the cf_id changes incrementaly following by new record saved.
What did I miss here?

On Page 4 I have multiplier with the separate table.
After action DB save I have custom code added :

<?php $form->data['tiesnesi']['cfk_id'] = $form->data['atskaite']['cf_id']; ?> where I try to assign first table cf_id to second table id.
This does not save nothing

I have read all the posts in this forums but still did not get it working so I probably need some paid help with this.
admin 29
May 24 2017, 18:22 #368573
Hi Elitakey,

I suggest that you use v6 instead, it has better support for the multi save.

You also should not pass the cf_id in a hidden field but save it in a session variable, that cf_id is only available after the form has been saved, do you want to save the form on each page ? if not then do not worry about the cf_id

Best regards,
Max
E
Elitakey 282
May 25 2017, 07:40 #368584
I wanted to switch to cf6, but there is a problem with multiplier - it has changed and there is wery lean information about that how to configure it. I even wrot thet on other post...
I have very complex form with 5 pages and multiplier on one page.
I do need a help either way, pease.
E
Elitakey 282
May 25 2017, 07:42 #368585
Max, could you explain this with code: save it in a session variable?
E
Elitakey 282
May 25 2017, 07:47 #368586
or better write the guidelines how to configure multiplier. I am ready to start everything from scratch if I would be able to get the multiplier working in cf6
admin 29
May 25 2017, 09:10 #368592
Hi Elita,

Did you check the multi page demo in v6 ? you can use this as a start.

Do you need to save the form data after each page ?

Leave the multiplier to the last step, and you can test it in a different form until you can get it working.

Best regards,
Max
E
Elitakey 282
May 25 2017, 09:27 #368596
yupp. that i am doing now. lets switch to this post:
https://www.chronoengine.com/forums/posts/t103283/cfv6-multiplier-section.html?keywords=multiplier%20v6