Get the value of an the input on input filed

Hello
I m bigginer on PhpMaker and asking for support
How can i get the value of an input filed into an other input filed
Example :
I have 3 input : price, tax, amount
Amount = price * tax. Amount shoud be readonly and shown to the user
How can i do this with the phpmaker
Thanks

you can use script like this :var myfn = function() {
var $price = $(this).fields(“price”);
var $tax= $(this).fields(“tax”);$(this).fields(“amount”).value($price .toNumber()* $tax.toNumber() ); };$(“input[data-field='x_price]”).on(“change”,myfn);
$(“input[data-field=‘x_tax’]”).on(“change”,myfn);add this to table specific startup script for add/copy and edit

var myfn = function() {
var $price = $(this).fields(“price”).value();
var $tax= $(this).fields(“tax”).value();$(this).fields(“amount”).value($price .toNumber()* $tax.toNumber() ); };$(“input[data-field='x_price]”).on(“change”,myfn);
$(“input[data-field=‘x_tax’]”).on(“change”,myfn);