When adding new elements to an existing form via AJAX using hook_form_alter, for example, clicking a checkbox adds a datefield input, hoping someone can point me in the right direction as I think the below approach seems too hacky.
It's in a .module file, so no class to set vars, so am using user input to define how the element should render.
The approach below works, however can anyone point me in the direction for the "correct" way to do this.
Removed the bulk of the code so only the relevant code is here in this post.
Quick question please, I'm trying to figure out how I get to display my custom form mode please as a separate edit form route (edit/linked_classes).
I have created a new form mode and added it to the config in my module so on install the display mode is there called linked_classes
I generated my custom entity type through Drupal Console and added a bundle, I expected to see a routing.yml file but instead I have a links.task.yml file.
I think this sorts out the routing for me as far as I can tell and in it I have
I have to develop a robust website, similar to airbnb.com
The website will contain properties for rent and in each one there will be rooms. The users will be able to hire the rooms while other users will be able to advertise them. Their will be a hierarchy of property managers, rooms managers and company managers (with a few properties). The rate of the rooms will change according to days and hours. Users will be able to pay in their own currency... etc etc...