• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Variables betwwen form and email

Variables betwwen form and email 17 years 1 month ago #2438

Hi everyone,

wonder if you can help me on this:

My client wants a 2 part form, one for general data and one for payment information.
I got the data from form1 passing on to form2 using the code I found here on another post. This is the code I'm using:

form1 : Script called on form process
if(isset($_POST['form']['nome'])){
    $_SESSION['form2']['nome']['default_value'] = $_POST['form']['nome'];
}
if(isset($_POST['form']['morada'])){
    $_SESSION['form2']['morada']['default_value'] = $_POST['form']['morada'];
}

form2 : Script called on form display
if(isset($_SESSION['form2'])){
    foreach($fields as $i=>$field){
        if($field->nome=='nome') $fields[$i]->default_value = $_SESSION['form2']['nome']['default_value'];
    }
}
 
if(isset($_SESSION['form2'])){
    foreach($fields as $i=>$field){
        if($field->morada=='morada') $fields[$i]->default_value = $_SESSION['form2']['morada']['default_value'];
    }
}

The thing is, if I make an \"echo\" output on form2, it shows me the data inputed on form1.
But when the form is sent by mail (form2 as the send by mail action), I get the correct output for form2 but only the field id's from form1, like this:

[i]//form1[/i] Nome: {nome} Morada: {morada} C[code]
//form1
Nome: {nome}
Morada: {morada}
C
The administrator has disabled public write access.

Re:Variables betwwen form and email 16 years 7 months ago #4669

I think it is easier to use the Mapping plugin to store data into your database table

In the second form, then you can retreive data from your database table by writting a sql select in the default value
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!