Here’s an example of how to update the custom amount field with JavaScript: https://gist.github.com/spencerfinnell/bc770cce91af5d79fdb0a187faa0bd77#file-script-js-L5
The field can be hidden with CSS, but it needs a custom amount price option so JavaScript can adjust it.