Forum


Calc Builder Support

Calc Builder support
Forums
Public write access is disabled. Please login

intial value of a text field to be equal the value of another field 20.09.2015 12:29

Hi,

I need the initial value of a text field to be equal to an inline field value as a start till user changes its value.

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
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect

Our clients' feedback