I'm working on a paper requisition form and it has a table where you select the size of the paper being ordered from a dropdown and it fills in the unit price in another field. It works fine on the initial row, but if I add a row to select more than one type of paper it doesn't work on the subsequent rows. I'm sure I'm missing some kind of logic to tell it to do this per row, but I'm a javascript noob and haven't worked much with tables.
Here's the relevant piece of script:
function pricefill() { if ($('.size select').val() == '8 1/2" x 11"') { $('.unitprice input').val("22.30") } if ($('.size select').val() == '8 1/2" x 14"') { $('.unitprice input').val("38.17") } }
I'm sure I could accomplish this using a lookup rule, but I was trying to avoid setting up a data source for a couple of paper sizes.