You cannot add text values with a sybmol or text in it. Even if you use a number wrapper its not gonna work. Try this:
var a = $w("#text1").text;
var b = $w("#text2").text;
var x = a.slice(1); //remove the symbol
var y = b.slice(1); //remove the symbol
var totalprice = Number(x) + Number(y);
$w("#totalprice").value = totalprice.toLocaleString('en', { style: 'currency', currency: 'GBP' });
This works perfectly. If I have this kind of text string and I want to push it to a connected database, will that work? I have the connected the text box to the database, with a submit button etc but everything but the price data in the format £#### will get populated in the database.
In this because its a non-user input field or because of the text string issue?