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.
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.
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
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
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.
I have very complex form with 5 pages and multiplier on one page.
I do need a help either way, pease.
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
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
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
This topic is locked and no more replies can be posted.