Title: Function not firing
Last modified: April 30, 2018

---

# Function not firing

 *  Resolved [lukesimoncurtis](https://wordpress.org/support/users/lukesimoncurtis/)
 * (@lukesimoncurtis)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/function-not-firing/)
 * Hi there – I can’t seem to get this function to fire and pre populate the address
   field on my contact form with anything at all… any ideas?
 *     ```
       add_filter( 'cf7_2_post_filter_cf7_field_value', 
       'field_default_value',10,5);
   
       function field_default_value($value, $cf7_id, $field, $cf7form_key, 
       $form_terms){
           if('your-address' == $field){
              global $current_user;
              //get your user's address
              $value='test';  
          }
         return $value;
       }
       ```
   
 * It’s loaded on the page with
 * `[cf7-form cf7key="untitled-2"]`
 * And the field on the form is:
 *     ```
       <div class="input-area"> Address: *[text* your-address class:input-box] 
       </div>
       ```
   
 * Thanks!

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

 *  Plugin Author [Aurovrata Venet](https://wordpress.org/support/users/aurovrata/)
 * (@aurovrata)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/function-not-firing/#post-10230839)
 * Is your form mapped? if the form is not mapped or in draft map mode, this hook
   will not fire.
 * If your form has a ‘Save’ tag, allowing users to save draft submissions before
   final submission, this hook will fire initially the first time a user loads the
   form, but if that user saves a draft and revisits the form, they will see their
   saved values and therefore this hook will not fire.
 *  Thread Starter [lukesimoncurtis](https://wordpress.org/support/users/lukesimoncurtis/)
 * (@lukesimoncurtis)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/function-not-firing/#post-10230956)
 * I’m not sure if I’m following – I want it to function as a standard contact form
   but the address of the current user be pre-populated i.e. no drafts or saves,
   just a simple send?
 *  Plugin Author [Aurovrata Venet](https://wordpress.org/support/users/aurovrata/)
 * (@aurovrata)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/function-not-firing/#post-10231012)
 * Is your form mapped?

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

The topic ‘Function not firing’ is closed to new replies.

 * ![](https://ps.w.org/post-my-contact-form-7/assets/icon-256x256.png?rev=1985682)
 * [Post My CF7 Form](https://wordpress.org/plugins/post-my-contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-my-contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-my-contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/post-my-contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-my-contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-my-contact-form-7/reviews/)

## Tags

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

 * 3 replies
 * 2 participants
 * Last reply from: [Aurovrata Venet](https://wordpress.org/support/users/aurovrata/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/function-not-firing/#post-10231012)
 * Status: resolved