user interface – When to update a database from changes made to an "active" HTML form?

I am working with software that uses an HTML form for a user interface to modify some configuration information. The back end is a database (strictly speaking).

The front-end has a hierarchy of values ​​that can be changed in or