Change checkout attribute from input value shopify plus

Hi

Im a shopify plus customer and im trying to achieve to add a custom field to the order that you fill on the checkout page, so far i have been able to display the current checkout attribute for this value and im able to assign a new value to it through hardcoding in the script, but not when i try to grab the value from the input field.

How can i set the new value for “pickupValue” based on whats written in my input field?

Input


Javascript