Title: Adding a Label/Input Type
Last modified: August 19, 2016

---

# Adding a Label/Input Type

 *  Resolved [photomill](https://wordpress.org/support/users/photomill/)
 * (@photomill)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/adding-a-labelinput-type/)
 * Hi! I’m using this and it works great. What I wanted to know is how do I add “
   Website” to the contact form? I want to add something like this:
 * <label for=’website’>Website:</label>
    <input type=’text’ id=’XXXXX’ name=’XXXXX’
   tabindex=’1003′ />
 * But don’t know what to put in for the X’s. Any help would be appreciated. Thanks!
   
   Best, Eric

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Eric](https://wordpress.org/support/users/emartin24/)
 * (@emartin24)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/adding-a-labelinput-type/#post-705865)
 * Try:
    `<input type='text' id='website' name='website' tabindex='1003' />`
 * You’ll then need to update the smcf_data.php file. Below:
    `$message = isset(
   $_REQUEST['message']) ? $_REQUEST['message'] : '';`
 * Add:
    `$website = isset($_REQUEST['website ']) ? $_REQUEST['website '] : '';`
 * Change the sendEmail call to:
    `sendEmail($name, $email, $message, $website);`
 * Change the sendEmail function to look like:
    `function sendEmail($name, $email,
   $message, $website) {`
 * Then, below:
    `$body .= "Message: $message";`
 * Add:
    `$body .= "Website: " . filter($website) . "\n\n";`
 * In smcf.css, below:
    `#contactModalContainer input#email,`
 * Add:
    `#contactModalContainer input#website,`
 * And adjust the height in:
    #contactModalContainer .content {background-color:#
   333; color:#ddd; height:260px;}
 * To 280px or whatever fits your needs.
 * Lastly, in smcf_javascript.php, change:
    `jQuery('#contactModalContainer #name,#
   contactModalContainer #email, #contactModalContainer #message').css({`
 * To:
    `jQuery('#contactModalContainer #name, #contactModalContainer #email, #contactModalContainer#
   message, #contactModalContainer #website').css({`
 * That should do it 😉 If not, let me know.
 *  Thread Starter [photomill](https://wordpress.org/support/users/photomill/)
 * (@photomill)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/adding-a-labelinput-type/#post-705867)
 * Wow! You’re awesome! I’ll give it a go and report back.
 * Cheers!
    Eric
 *  Thread Starter [photomill](https://wordpress.org/support/users/photomill/)
 * (@photomill)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/adding-a-labelinput-type/#post-705886)
 * Hi Emartin!
 * Things are looking pretty good with this. The only thing that I haven’t been 
   able to resolve is getting the website to show up in the e-mail message. Everything
   else looks and functions properly.
 * Thanks for your help on this as, outside of adding some things here and there,
   I’m essentially PHP illiterate.
 * Best,
    Eric
 * UPDATE
 * Ok – I got it worked out. Such simple things make all the difference. All I had
   to do was delete an extra space in:
 * $website = isset($_REQUEST[‘website’]) ? $_REQUEST[‘website’] : ”;
 * There was a space after between in here: [‘website ‘] : ”;
 * It works very well. Thanks again for you help!
 *  [Eric](https://wordpress.org/support/users/emartin24/)
 * (@emartin24)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/adding-a-labelinput-type/#post-705891)
 * In looking at what I posted above, try moving:
    `$body .= "Website: " . filter(
   $website) . "\n\n";`
 * Above the `$body .= "Message: $message";` line, as opposed to below it.
 * The other thing to try is a simple `echo "Website: " . $website;` in the sendEmail
   function. When you submit the form, if you don’t see it output to the screen,
   it means something is wrong.
 * If that doesn’t help, let me know and I can just send you the files.
 * -Eric
 * UPDATE – just saw your update 😉 Glad you got it working!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Adding a Label/Input Type’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [Eric](https://wordpress.org/support/users/emartin24/)
 * Last activity: [18 years, 3 months ago](https://wordpress.org/support/topic/adding-a-labelinput-type/#post-705891)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
