Title: Feed back form
Last modified: August 19, 2016

---

# Feed back form

 *  Resolved [benrshep](https://wordpress.org/support/users/benrshep/)
 * (@benrshep)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/feed-back-form/)
 * I have this form in the footer of my wordpress blog but when i test it on my 
   blog it doesnt validate and display the error messages it is supposed to. The
   site is located [here](http://iwarrior.uwaterloo.ca) and the form can be found
   at the bottom. If you can give any suggestions please let me know.
 * regards
    benjamin shepherd
 * > <h3>Feedback</h3>
   >  <?php
   >  function set_field_value($form)
   >  { return isset($_POST[$form]) ? $_POST[$form]:”;}
   >  function show_field_error($form)
   >  { global $error; return isset($error[$form])?‘
   > <label style=”color:red”><b>’.$ferror[$form].'</b></label>’ : ”; }
   >  if(isset($_POST[‘submit’]))
   >  { if(isset($_POST[‘fname’]) && empty($_POST[‘
   > fname’])) { $error[‘fname’] = ‘Please fill in your name’; }
   >  if(isset($_POST[‘femail’]) && empty($_POST[‘femail’]))
   >  { $error[‘femail’]
   > = ‘Please fill in your email’; }
   >  if(isset($_POST[‘fback’]) && empty($_POST[‘fback’]))
   >  { $error[‘fback’] = ‘
   > Please fill in feedback’; } if (!$error) { $mailMessage = “Name: “.$_POST[‘
   > fname’].” Email: “.$_POST[‘femail’].” Feedback: “.$_POST[‘fback’]; echo “Feedback
   > Submitted”; mail(‘myemailp@asdfa.com’,’Website Feedback’, $mailMessage); } }
   >  ?>
   >  <form action=”” method=”post” name=”feedbackform”> <?php echo show_field_error(‘
   > fname’); echo show_field_error(‘femail’); echo show_field_error(‘fback’); ?
   > >
   >  <label>Full Name:</label>
   >  <input class=”fname” size=”20″ type=”text” name
   > =”fname” value=”<?php echo set_field_value(‘fname’); ?>” />
   >  <label>Email:</label>
   >  <input class=”femail” type=”text” name=”femail” value
   > =”<?php echo set_field_value(‘femail’); ?>” />
   >  <label class=”ftextlabel”>Let us know what we can do to make your experience
   > on this site better</label>
   >  <textarea class=”ftext” type=”text” name=”fback”
   > ><?php echo set_field_value(‘fback’); ?></textarea>
   >  <input class=”fsubmit” type=”submit” value=”Send Feedback” />
   >  <label>*All
   > fields required</label>
   > </form>

Viewing 1 replies (of 1 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/feed-back-form/#post-1354940)
 * You might want to have a look at using the [Contact Form 7](http://wordpress.org/extend/plugins/contact-form-7/)
   or [TDO Mini Forms](http://wordpress.org/extend/plugins/tdo-mini-forms/) plugins
   for this.

Viewing 1 replies (of 1 total)

The topic ‘Feed back form’ is closed to new replies.

## Tags

 * [forms](https://wordpress.org/support/topic-tag/forms/)
 * [validating](https://wordpress.org/support/topic-tag/validating/)

 * 1 reply
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/feed-back-form/#post-1354940)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
