PDA

View Full Version : How? Multiple Forms on one php page...


philip229496
11-09-2009, 10:27 PM
Hi Guys,

I have a new site for a client using your CFS Pack. I have a forms.php page for them that uses TABBED divs to provide 3 different forms for visitors to use - one for general contact, one for Contact Lens orders and one to book appointment requests... At least that is what they will provide once I can get the 3 "standard" contact forms working together on one physical page...

I have made 3 lots of the header code with altered field names, altered the corresponding field names in each form and altered the var widget generators to match after each form section in each div...

The site is www.sjoptom.com.au/forms.php if you'd be so kind as to have a look.

I have not changed the

I have also modified the WAUE_Contact_1.php with the code...

case "Email_address":
$MailFrom = "".((isset($_POST["Email_address"]))?$_POST["Email_address"]:"") ."";
break;
case "Email_address_Lens":
$MailFrom = "".((isset($_POST["Email_address_Lens"]))?$_POST["Email_address_Lens"]:"") ."";
break;
case "Email_address_App":
$MailFrom = "".((isset($_POST["Email_address_App"]))?$_POST["Email_address_App"]:"") ."";
break;
to try and get the correct email value for the corresponding div form so that the mail is processed using the selected form's information...

The forms.php page shows all the error state spans at the outset so something is not validating server side before a form field is even selected to be filled in.

Any help would be greatly appreciated!!

I thought you'd like a nice curly question to sink your teeth into :8^)

Thanks in advance,

Philip

Dani Chankhour
11-10-2009, 10:43 AM
It looks like you might not have updated the Spry validation on the forms.

You will also need to modify the spry validation, by giving each new form a new name for the spry element, make sure to also update the spry element name at the bottom of the page.

philip229496
11-10-2009, 01:49 PM
Hi,

Thanks for the thoughts, but can you have a look at the code on the actual live page please? I have unique labels and variables for each form so the spry validation should be applying to each form independently... I do have the spry var code at the bottom of EACH div (after the labels are declared) rather than at the bottom of the entire page... could that cause a problem?

I also have not altered your "1" "2" "3" "4" "5" "6" "7" parameters for each form.... What are they for? Are they merely pointers to the form fields location for cursor placement on return of error? If so are they happy to be declared for each individual form on the one page or does your code simply count through the total number of fields on the PAGE rather than the FORM?

Any insight you can provide in solving this will be appreciated.

Thanks.

Philip

Dani Chankhour
11-10-2009, 02:16 PM
I have opened a support ticket to better assist you. Please respond to your ticket at:

http://www.webassist.com/mywebassist/supporthistory.php