I have a template in which I've manually built a form. It renders some variables that come from a controller.
I've looked over the Form API and I think I should build the form using that. But I'm not quite sure how to go about it.
I'm relatively new to Drupal 8 and to be perfectly honest the Documentation is good, if one knows what to look for. It's not the case here.
Basically what I'm asking, is it possible(or rather advised) to somehow grab the form in the controller, and instead of passing the variables to the template, simply pass the created form to the template?
I'm assuming it would be better to do that, although I'm note quite sure that's the case.