Answer the question
In order to leave comments, you need to log in
How to programmatically fill a form field in Drupal8?
I have a node creation form. It has a hidden field in which I want to write data from a third-party api. These are the coordinates, they are constantly changing. What is the best way to do this in Drupal. I roughly imagine the option with js (after loading the page with the form, the script receives the data and writes it to the form field). Interested in the option "drupal way" the correct way. After all, for example, if the script is not entirely correct - the form can be opened and sent in an hour, and the coordinate data will be saved with a delay. Thanks to everyone who advises.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question