I am creating a Drupal 8 form using custom content type. One of the fields to be created is a select list. The data that will be on the select list is stored in a MySQL database which needs to be queried out.
I have been asked to use hook_form_alter to create this list. I have been looking up a lot about this but I couldn't find a comprehensive guide on it.
- How do I know my form_id?
- How do I create this list?
- Where do I create and store this module?
Any suggestion will be greatly appreciated. Also, if you know a resource(book/website) that talks about it, please do mention it. It will be of great help.