Forum
Calc Builder Support
Calc Builder supportForums
No se permite escribir sin estar logado. Por favor, login
Re: intial value of a text field to be equal the value of another field 21.09.2015 09:50
Hi,
you can copy the value between two input fields at the time the form loads, using the first js tab of your calculator and this code:
//recover value from yourfield1
var val1=CB("input[fldname=yourfield1]").val();
//assing to input yourfield2
CB("input[fldname=yourfield2]").val(val1);
But at this time the inline results are not present at your page yet, as they are values returned by the calculator (server). You can only recover inline contents once the calculation has returned (at the 'Executed after calculate execution' tab). Here we share the code used to recover content from an inline section:
//replace inlinefld for your own inline field name
var val1=CB("div[fldname=inlinefld]").html();
Hope this helps
Moonsoft Team
www.moonsoft.es
you can copy the value between two input fields at the time the form loads, using the first js tab of your calculator and this code:
//recover value from yourfield1
var val1=CB("input[fldname=yourfield1]").val();
//assing to input yourfield2
CB("input[fldname=yourfield2]").val(val1);
But at this time the inline results are not present at your page yet, as they are values returned by the calculator (server). You can only recover inline contents once the calculation has returned (at the 'Executed after calculate execution' tab). Here we share the code used to recover content from an inline section:
//replace inlinefld for your own inline field name
var val1=CB("div[fldname=inlinefld]").html();
Hope this helps
Moonsoft Team
www.moonsoft.es