Title: Populate values between forms
Last modified: February 10, 2021

---

# Populate values between forms

 *  Resolved [dareko](https://wordpress.org/support/users/dareko/)
 * (@dareko)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/populate-values-between-forms/)
 * Hello,
    I have two forms on one page. I want to use the value of calculated field(
   fieldname99) in one form (id=25) as a value of a field (fieldname30) in the second
   form (is=53). I’ve tried to use your examples from documentation:
 * [CP_CALCULATED_FIELDS id=”25″]
    [CP_CALCULATED_FIELDS_RESULT fields=”fieldname99″
   formid=”25″] [CP_CALCULATED_FIELDS_RESULT] <script><br /> cpcff_default = { 2:{}};
   <br /> cpcff_default[2][ ‘fieldname106’ ] = ‘<%fieldname99_value%>’;<br /> </
   script> [/CP_CALCULATED_FIELDS_RESULT] [CP_CALCULATED_FIELDS id=”53″]
 * It doesn’t work.
    I’m afraid I can not use the solution with “Thank you page”
   because my version of the plugin haven’t it. I’ve also tried to use session variable,
   but I do not know how to set its value to the calculated value. Is there any 
   other solution for this case? Thank you in advance.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpopulate-values-between-forms%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/populate-values-between-forms/#post-14033305)
 * Hello [@dareko](https://wordpress.org/support/users/dareko/)
 * The solution you have implemented does not work in your case because you are 
   not submitting the form, and your version of the plugin does not support the 
   shortcode for results.
 * Please, follow the steps below:
 * 1. Assign a unique class name to the fieldname99 in form 25, for example: `field-
   a`
 * 2. Insert a hidden field in form 53, and assign to it another class name, for
   example: `field-b`
 * Note: the class names are assigned to the fields through their attributes: “Add
   CSS Layout Keywords”
 * 3. Insert an “HTML Content” field in the form 53 with the following piece of 
   code as its content:
 *     ```
       <script>
       jQuery(document).on('change', '.field-a input', function(){jQuery('.field-b input').val(this.value).change();});
       </script>
       ```
   
 * 4. Finally, you can use the hidden field in form 53 in the equations of the calculated
   fields in form 53.
 * Best regards.
 *  Thread Starter [dareko](https://wordpress.org/support/users/dareko/)
 * (@dareko)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/populate-values-between-forms/#post-14036638)
 * Hello
    Thank you very much for your quick response and solution. It works perfectly.
   Great job. Kind Regards Dareko

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

The topic ‘Populate values between forms’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

## Tags

 * [forms](https://wordpress.org/support/topic-tag/forms/)
 * [populate](https://wordpress.org/support/topic-tag/populate/)
 * [values](https://wordpress.org/support/topic-tag/values/)

 * 2 replies
 * 2 participants
 * Last reply from: [dareko](https://wordpress.org/support/users/dareko/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/populate-values-between-forms/#post-14036638)
 * Status: resolved