peter.gariepy wrote:can i create a 2 page form?
1 that collects and email address with a submit button.
2 the second that populates the email field from what was submitted in the first, then allows the user to complete the form and submit.
help?
Peter
I have a system that will probably do what you need. I use it for conference delegates who wish to submit a paper for discussion. I made 2 linked forms.
Form 1 collects the delegates surname and email address and checks that the delegate has registered for the conference. If the registration exists, form 1 calls form 2 which is a form for entering the paper details and uploading a file with the paper.
Here is what you do:
Make 2 forms called, say, "form1" and "form2" with whatever fields you need including a field for the user email in both. For the example below I have used the name "formemail" in both forms.
In the "Manage Forms" page of the RSForm Pro Component, identify your "form2" and click "preview" in that line of the forms table (NOT the preview in the top menu line of the page). This will open a new window displaying your empty "form2".
Now look at the page address at the top of your browser, it should be something like this:
www.yoursite.com/index.php?option=com_rs...ormId=2&Itemid=99999
note: the missing part of the URL is "form&formi". I cannot stop the editor translating the URL. Just copy the full address, including the http:// part from your browser page address.
(note: if you already have other forms, the address with have a different "formID" number from the "2" shown here.)
Copy this address to your clipboard.
Now close that window and in the "Manage Forms" page of the RSForm Pro component open your "form1".
Then click the "Edit Form" button and paste the address of your "form2" into the area labeled "Return URL".
Move your cursor to the end of the address and add: "&formemail={formemail:value}" without the quotes, so the full entry will be like:
www.yoursite.com/index.php?option=com_rs...ail={formemail:value}
note: the missing part of the URL is "form&formid=2&itemid"
Do not enable the "Thank you" message - leave it empty.
Save your changes to "form1".
Now open your "form2" and click the "Edit" symbol for the "formemail" field. Scroll down to the "Default value" box and enter this :
//<code>
if (isset($_GET)) without the backslashes - the editor again!
{
$formemail = $_GET;
return $formemail;
}
//</code>
Save the changes.
Test your system by opening "form1" in your browser, complete the form and submit. This should immediately open your "form2" with the email address already completed.
You can pass any number of parameters this way - just add "&fieldname={fieldname:value}" to the end of the "Return URL".
I also use this system to pass between forms, new variables calculated from data entered in "form1" (or retrieved from a database) and saved in session variables. In those cases I enter the following code in the "Default value" box of a "form2" element:
//<code>
$fieldname2 = $_SESSION;
return $fieldname2;
//</code>