WEB COMPONENTS AND FORMASSOCIATED: EVERY IS WRITING THE FORM UPDATE FUNCTION WRONG
Everyone writes updateFormValues() wrong.
If you work in Web Components (like Lit, Fast, or just plain vanilla web components), under the new
hotness of attachedInternals and formAssociated, DOM methods that allow you to create new web
components that interact with forms. You can now write your own input controls, which is very cool,
and fraught with difficulty.
Every example of a custom control includes a function named something like updateFormValues().
Forms don't automatically extract their values from the input controls at submit time; each control
has to push its value to the form after it has been updated and validated. updateFormValues() is
that function: it takes the input being monitored by the component and passes it to the form, so
that when the form is submitted the values are sent wherever the action attribute says they should
go.
Unfortunately, every example of updateFormValues I have seen is wrong.