addElement('header', 'MyHeader', 'Compilate il modulo per richiederci il materiale informativo,', "class=background"); $form->addElement('header', 'MyHeader', 'a titolo grauito e senza alcun impegno', "class=background"); $form->addElement('text', 'azienda', 'azienda'); $form->addElement('text', 'indirizzo', 'indirizzo'); $form->addElement('text', 'citta, cap, provincia', 'citta, cap, provincia'); $form->addElement('text', 'telefono', 'telefono'); $form->addElement('text', 'fax', 'fax'); $form->addElement('text', 'e-mail', 'e-mail'); $form->addElement('text', 'web', 'web'); $form->addElement('text', 'nome', 'persona da contattare'); $form->addElement('text', 'prodotti', 'prodotti'); $form->addElement('textarea', 'note', 'note'); $form->addElement('radio','Arredamento','Arredamento','tutto il materiale',"tutto il materiale"); $form->addElement('radio','in particolare (1)','1','Index Dubai',"Index Dubai"); $form->addElement('radio','in particolare (2)','2','Interiors India',"Interiors India"); $form->addElement('radio','in particolare (3)','3','Building & Construction Shanghai',"Building & Construction Shanghai"); $form->addElement('radio','in particolare (4)','4','gulfBID Bahrain',"gulfBID Bahrain"); $form->addElement('radio','in particolare (5)','5','Office Dubai',"Office Dubai"); $form->addElement('radio','in particolare (6)','6','InRetail Dubai',"InRetail Dubai"); $form->addElement('radio','in particolare (7)','7','designex Australia',"designex Australia"); $form->addElement('radio','Beauty','Beauty','tutto il materiale',"tutto il materiale"); $form->addElement('radio','in particolare (8)','8','Beyond Beauty Paris',"Beyond Beauty Paris"); $form->addElement('radio','in particolare (9)','9','Intercharm Kiev',"Intercharm Kiev"); $form->addElement('radio','in particolare (10)','10','Intercharm Mosca',"Intercharm Mosca"); $form->addElement('radio','in particolare (11)','11','Intercharm Professional Mosca',"Intercharm Professional Mosca"); $form->addElement('radio','Altri Settori','Altri Settori',' '," "); $form->addElement('radio','in particolare (12)','12','ME Exclusive Dubai',"ME Exclusive Dubai"); $form->addElement('radio','in particolare (13)','13','Premium Dubai',"Premium Dubai"); $form->addElement('radio','in particolare (14)','14','Private Label Dubai',"Private Label Dubai"); /// inserire campo NOTE $form->addElement('submit', 'btnSubmit', ' Invia '); $form->addElement('reset', 'btnClear', 'Reset'); $form->addRule('azienda', 'attenzione: il campo non deve essere vuoto', 'required'); $form->addRule('telefono', 'attenzione: il campo non deve essere vuoto', 'required'); $form->addRule('telefono', 'attenzione: il campo deve avere un valore numerico', 'numeric'); $form->addRule('e-mail', 'attenzione: il campo non deve essere vuoto', 'required'); $form->addRule('e-mail', 'attenzione: deve essere inserito un indirizzo valido', 'email'); $form->addRule('nome', 'attenzione: il campo non deve essere vuoto', 'required'); $form->setRequiredNote('* campi obbligatori'); // - NON TOCCARE - Codice eseguito una volta validato il form ************************************ if ($form->validate()) { $form->removeElement('btnSubmit'); $form->removeElement('btnClear'); $form->addElement('html','La richiesta è stata correttamente inoltrata. Riceverà quanto prima il materiale richiesto (home)'); $msg=''; $giorno=''; foreach($_POST as $key => $valore){ if(substr($key,0,4) == 'data'){ foreach($valore as $keyD => $valoreD){; $giorno.=$valoreD . "/"; } $msg.=$key . ": " . substr($giorno,0,strlen($giorno)-1) .chr(10).chr(13); }else{ if($key != 'btnSubmit'){ $msg.=$key . ": " . $valore .chr(10).chr(13); } } } mail('info@corexpo.it','Form da sito internet',$msg); $form->freeze(); } // ************************************************************************************************** $form->display(); ?>
bvhabhllbahljvb |