I'm novice to the "new" MVC framework extbase on TYPO3.
I'm trying to create a simple form with two selectors, one for "Schools" and one for "Programs".
I have made both models using the Extension Builder and I'm able to list all the schools and all the programs in their respective List templates.
Due the framework works with convention over configuration I don't know how to construct a Controller able to get data from those two models and pass them to the Template.
I want this code in the template works:
<f:form name="form">
<f:form.select name="form" options="{schools}" optionValueField="uid" optionLabelField="school" />
<f:form.select name="form" options="{programs}" optionValueField="uid" optionLabelField="program" />
</f:form>
And my Controller skeleton:
/**
* action show
*
* @param \Vendor\Extension\Domain\Model\Form $form
* @return void
*/
public function showAction(\Vendor\Extension\Domain\Model\Form $form) {
// Some code
$this->view->assign('schools', $schools);
// Some code
$this->view->assign('programs', $programs);
}