Please could you assist.
How can i take numbers entered into a label field, add them together and display the answer into another label field on the same page.
Please could you assist.
How can i take numbers entered into a label field, add them together and display the answer into another label field on the same page.
Hi David -
How you enter values in the label component?
It very depends where and when you are have to do it.
So the simplest way (when target legends are on the page and filled by their values) is to use next code:
pre
//Get values of existing labels.
var labelFirstNameText = Appery("label_firstName").text();
var labelSecondNameText = Appery("label_secondName").text();
//Combine two values together.
var labelFullNameText = labelFirstNameText + " " + labelSecondNameText;
//Populate full name label by resulting value.
Appery("label_fullName").text(labelFullNameText);
/pre
Regards.