how to set a value of an input field using values in a repeater
I have this input fields inside a repeater, product name, price and quantity, and I have an input field total disabled by default outside of the repeater, I want to populate the result of
foreach(price * quantity)
inside the total field7 Replies
my codes look like this
function the login in the afterStateUpdated do:
$set('../total', $value);
But... using disabled may not allow for the value to be updated in the DB, so ensure you set a mutate before save which sets thte total value if it's a total charigng price for example.
the problem is i want it to be shown in to the user while adding up the orders, though i don't want them to be able to change the total, i saw somewhere the use of placeholder but not sure if that could work
GitHub
Set value of a field that is outside the repeater field, from a fie...
I'm trying to update the value of a field that is outside a repeater from a field that is inside the repeater, but the calculated value is doubling. For example, if I type 2 in the quantity fie...
where i tried implementing something like this
it works with this but the problem when more that a single product is order for
You need to then get the items and build a loop and count the unit_price X quantity
as a rough example
Thank you, let me test it out