Hello @iskinderun
If both forms are in the same page, I recommend you the following workaround:
– In the first form, assign an unique class name to every field in the first form you want to use in the form 2, for example: field-a, field-b
– In the second form insert a hidden field for every field you want to import from the first form, and assign to them an unique class name, for example: the fields: fieldname123 and fieldname456 with the class names: form-2-field-a, form-2-field-b respectively.
Note, the class names are assigned to the fields through their attributes: “Add CSS Layout Keywords”
– Now insert in the second form a “HTML Content” field with the following piece of code as its content:
<script>
jQuery(document).on('change', '.field-a input', function(){
jQuery('.form-2-field-a input').val(this.value).change();
});
jQuery(document).on('change', '.field-b input', function(){
jQuery('.form-2-field-b input').val(this.value).change();
});
</script>
– Finally, you can use in the equations associated to the calculated fields in the second form, the hidden fields by their names as usual (in this example, the fieldname123 and the fieldname456)
Best regards.
Thank you for quick reply.
Yes, I tried that way referring your previous answer, and it doesn’t work.
I’m trying to export values of calculated fields. However, the solution only works when exported fields(form 1) are number, currency, etc..
For calculated fields, though it seems that the value is imported, it’s still considered as 0 when I try to use the value.
Can you suggest any other way for calculated fields? Thanks.
Hello @iskinderun
Please, indicate the URL to the webpage where were inserted forms with the recommended solution.
Best regards.
http://pryderi.iwinv.net/wp/elementor-11453/
This page shows the problem clearly.
as you see, it works well for a number field, not for a calculated field.
-
This reply was modified 7 years, 3 months ago by
iskinderun.
-
This reply was modified 7 years, 3 months ago by
iskinderun.
I tried a way to transfer a calculated field to a number field ‘within the form 1’, and then export the number to form 2 again.(using your script twice) even if it’s a bit messy, thought this might solve the problem because it becomes exporting a number field. but… it didn’t. It seems it only works when the exported field’s value is handwritten.
-
This reply was modified 7 years, 3 months ago by
iskinderun.
-
This reply was modified 7 years, 3 months ago by
iskinderun.
Hello @iskinderun
I’ve checked your form and you have not followed my instructions.
In the second form you SHOULD INSERT A HIDDEN FIELD (not a calculated field) and assign to it your current class name: importedfielda
Note: remove the class name importedfielda from the calculated field.
and then, in the equation associated to the calculated field you use this hidden field by its name: fieldname#### (the field name that corresponds)
Best regards.
Oh god. It was a unique field name.thought you meant any field hidden from public. Thank you so much and sorry for not understanding a brilliant instruction.
Hello @iskinderun
It has been a pleasure to help you.
Best regards.