Forums

How can I get custom field through my multi page form ?

szabob 26 Jun, 2019
Hi All,

I just cannot get this work !

I set up a multi page form with 2 pages. All the field data in passing between the pages except: when I try to add a custom field it gets lost on the next page. Am I doing something wrong ?
My custom data field lokk like this:
<?php 

$this->data['custom'] = 'This is a custom field';

?>
It will appear on the first page debug:
Array
(
    [chronoform] => test_save
    [option] => com_chronoforms6
    [Itemid] => 
    [custom] => This is a custom field
)
But when I go to page two it is not there anymore:
Array
(
    [chronoform] => test_save
    [event] => two
    [text_one] => first text field
    [text_two] => second text field
    [hidden10] => hide one
    [button6] => 
    [option] => com_chronoforms6
    [Itemid] => 
)
Why? Please help me!

Thanks

Bob
healyhatman 26 Jun, 2019
Add it as a hidden field instead, or explicitly save it to session with the Data Builder 2 action.
szabob 26 Jun, 2019
Thanks healyhatman, I figured it out with adding the value to a hidden field. Could you tell me how I can use the Data Builder action ? I want to add the values of two data fields and save the result into the new data field?
healyhatman 27 Jun, 2019
It's pretty self explanatory, just set it to "session" and then you can retrieve the value later with {session:varname}
This topic is locked and no more replies can be posted.