'Drupal 8 form value not changing with javascript

I have a drupal form, which contains a title, username, email, ... and I want the user to be able to insert some values and submit the data. My problem now is that when submitting the form my values are unchanged. Currently I am loading the data in with javascript:

document.getElementById("response").value = JSON.stringify(dataToSend);

The weird thing is that I see the value being changed but not when submitted. This is how my form field currently looks like: drupal form

When submit is pressed the passed value will remain response_placeholder Anybody that can help me?



Solution 1:[1]

SOLVED: remove the #disable: true line

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1