Changeset 479 for trunk/docs/examples/contact_form/contact.php
- Timestamp:
- May 3, 2014 11:09:03 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/examples/contact_form/contact.php
r468 r479 52 52 // Validate submitted data. 53 53 validateInput(); 54 54 if ($fv->anyErrors()) { 55 55 // Re-populate form values with the user data so they can make corrections. 56 57 56 $frm = resetForm(getFormData()); 57 } else { 58 58 // Setup email object. 59 59 $email = new Email(array( … … 74 74 $frm = resetForm(); 75 75 $app->raiseMsg(_("<strong>Thank You!</strong> Your message has been sent."), MSG_SUCCESS, __FILE__, __LINE__); 76 76 } 77 77 } else { 78 78 // Reset form values to display a blank form. … … 96 96 function resetForm($new_values = array()) 97 97 { 98 99 100 101 102 103 98 $default = array( 99 'name' => '', 100 'email' => '', 101 'message' => '', 102 ); 103 return array_merge($default, $new_values); 104 104 } 105 105
Note: See TracChangeset
for help on using the changeset viewer.