Title: dynamically update field value &#8211; wpcf7.3.3.3.
Last modified: August 21, 2016

---

# dynamically update field value – wpcf7.3.3.3.

 *  Resolved [acub](https://wordpress.org/support/users/acub/)
 * (@acub)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/dynamically-update-field-value-wpcf7333/)
 * Hello.
    **the setup:** _WP version_ 3.4.2., very customized, almost impossible
   to update (very big website, thousands of users, theme not compatible higher)
   _wpcf7 version_ 3.3.3. All working great, but…
 * **the problem:**
    …I’m dynamically building a string based on user interaction
   and passing the value to a form input. I’d like to make the field show the changes.
   Was able to put the string in the value using basic jQuery syntax, but the field
   still shows the title attribute instead of the value. Here’s how the field’s 
   html looks before and after it gets the value: before:
 *     ```
       <span class="wpcf7-form-control-wrap text-621"><input type="text" name="text-621" value="" id="subiectul" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required wpcf7-use-title-as-watermark watermark" size="40" maxlength="200" title="Subiectul mesajului (max. 200 caractere)"></span>
       ```
   
 * after:
 *     ```
       <span class="wpcf7-form-control-wrap text-621"><input type="text" name="text-621" value="Super Party, 13 octombrie 2013" id="subiectul" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required wpcf7-use-title-as-watermark watermark" size="40" maxlength="200" title="Subiectul mesajului (max. 200 caractere)"></span>
       ```
   
 * What do I need to run/do in order to make the field show the value?
 * Thank you for looking into this.
 * [http://wordpress.org/plugins/contact-form-7/](http://wordpress.org/plugins/contact-form-7/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [acub](https://wordpress.org/support/users/acub/)
 * (@acub)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/dynamically-update-field-value-wpcf7333/#post-4211413)
 * I found the answer.
    For anyone wondering why their jQuery doesn’t work, you 
   need to enqueue the script in the footer, to the jquery array, so the wpcf7 scripts
   are loaded when yours is executed. Example:
 *     ```
       wp_enqueue_script('{your_script_name}','/{your_script_location}{your_file_name}.js', array('jquery') , null , true);
       ```
   
 * And the actual jQuery for updating an input value:
 *     ```
       jQuery("#{your_field_id}").val('{your_value}').removeClass('watermark');
       ```
   
 * Of course, you need to replace the accolades with your own specific values.

Viewing 1 replies (of 1 total)

The topic ‘dynamically update field value – wpcf7.3.3.3.’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

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

 * 1 reply
 * 1 participant
 * Last reply from: [acub](https://wordpress.org/support/users/acub/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/dynamically-update-field-value-wpcf7333/#post-4211413)
 * Status: resolved