Update quantity value based on J'QUERY output

Hi all. I am currently creating a flooring site in which the products require a calculator to price products. For example, a client inputs the length of the room and the with of the room and then the calculator tells you how many packs are required. I used J’Query to calculate this but now need the J’Query output to populate the quantity selector automatically. For example if the calculator says 20 packs are required the quantity selector automatically sets to 20. You can see a good example of this here: https://www.woodfloorwarehouse.co.uk/irish-oak

Thanks in advance.

Hello @adammahon ,

What’s the issue you are facing to update it with jQuery ?

Actually a little sounds odd. You wrote the whole JS part to make the calculation but failed to update the quantity input.

btw I use this to update the input value:

var newval = value from your calculation;

$(‘#input-id’).val(newval );

Thanks

Sorry, I have already attempted this in my product page but it did not work? I can provide my code if that helps?