Title: Dynamic default value based on user selection
Last modified: April 15, 2022

---

# Dynamic default value based on user selection

 *  [mhmuc](https://wordpress.org/support/users/mhmuc/)
 * (@mhmuc)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/dynamic-default-value-based-on-user-selection/)
 * Hi,
 * I am using a CF7 form as input for a product-cost-calculator.
    The first field
   of the form is a product selection based on the product-name from the DB.
 * Later in the form I want to have an attribute of the selected product, which 
   has to be loaded from database to be shown as a default value of an input field
   to give the user a chance to change it before submission.
 * So what I need as some kind of an ajax-hook that is changing the input-default-
   value after changing the product name selection. Something like onChange…
 * Any idea on how to achieve this with CF7?
 * Thanks!

The topic ‘Dynamic default value based on user selection’ 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/)

 * 0 replies
 * 0 participants
 * Last reply from: [mhmuc](https://wordpress.org/support/users/mhmuc/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/dynamic-default-value-based-on-user-selection/)
 * Status: not resolved