[web2py] Re: Unable to calculate values of a selected Index

2023-03-27 Thread Peter
Try... Field('quantities', 'list:integer', required=True)) On Sunday, 26 March 2023 at 15:04:29 UTC+1 mostwanted wrote: > I want to be able to calculate subtotal by multiplying quantity and price > but I cant because > *var quantity = parseInt("{{=details.quantities[index]}}");* in the >

[web2py] Re: Unable to calculate values of a selected Index

2023-03-27 Thread Peter
To be clear I didn't come up with this (see my previous post)... Based on the provided code, it seems that the quantity variable is being assigned the same value every time, which is the value of details.quantities[index] for the first item in the list. This is because the details.quantities li