Title: Send custom data through comment form
Last modified: August 20, 2016

---

# Send custom data through comment form

 *  [mminkov](https://wordpress.org/support/users/mminkov/)
 * (@mminkov)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/send-custom-data-through-comment-form/)
 * Hello, I have been trying to customize the comment form on blog posts in order
   to send a custom field with the comment. I added the field successfully but after
   sending the comment the field doesn’t get sent. It’s urgent that I get it working,
   I need it to be included in the e-mail sent when a post is submitted.
 * Here’s the code I used to remove the url and include a nationality field:
 *     ```
       function mytheme_remove_url($arg) {
           $arg['url'] = '';
           return $arg;
       }
       add_filter('comment_form_default_fields', 'mytheme_remove_url');
   
       function my_fields($fields) {
           $fields['new'] = '<p><label for="nationality">Nationality</label>
           <input type="text" name="nationality" id="nationality" /></p>';
           return $fields;
       }
       add_filter('comment_form_default_fields','my_fields');
       ```
   

Viewing 1 replies (of 1 total)

 *  Thread Starter [mminkov](https://wordpress.org/support/users/mminkov/)
 * (@mminkov)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/send-custom-data-through-comment-form/#post-2250346)
 * Does anyone know how could I fix it?

Viewing 1 replies (of 1 total)

 The topic ‘Send custom data through comment form’ is closed to new replies.

## Tags

 * [comment](https://wordpress.org/support/topic-tag/comment/)
 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [form](https://wordpress.org/support/topic-tag/form/)
 * [post](https://wordpress.org/support/topic-tag/post/)

 * 1 reply
 * 1 participant
 * Last reply from: [mminkov](https://wordpress.org/support/users/mminkov/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/send-custom-data-through-comment-form/#post-2250346)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
