So i have a simple form that extends the FormBase and when i call the form i pass it an argument, depending on what the user selects within the form itself i rebuild the form and i need to pass a new argument to the buildForm, how do i do this?
class MyForm extends FormBase {
public function buildForm(array $form, FormStateInterface $form_state, $frv = null) {
...
}
public function validateForm(array $form, FormStateInterface $form_state) {
...
if (true) {
$form_state->setRebuild();
$frv = 'some new string';
// somehow pass this new $frv to the buildForm ???
}
}
}