I've encountered a problem where the hidden field in my form is not capturing the product id unless I manually type or change its value. It consistently shows as "none" when submitting the form.
TS https://i.stack.imgur.com/W9aIm.png
HTML https://i.stack.imgur.com/xGY0V.png
Console https://i.stack.imgur.com/1R0M0.png
I'm looking for suggestions on how to ensure that the hidden field captures the correct value without manual intervention. Any best practices or tips would be greatly appreciated!