private function generateInnerForm()
{
foreach ($this->selected_forms as $index => $selected_form) {
$form = BuiltForm::find($selected_form['form_id']);
if (!$form) {
continue;
}
// Get the information about the form
$this->getFormInfo($index);
// Get the available fields from the form data
$form_fields = $this->getFormFields($form->data);
if (!isset($form_fields['fields'])) {
// If the form has no fields, no need of this form
unset($this->selected_forms[$index]);
} else {
$this->selected_forms[$index]['fields'] = $form_fields['fields'];
$this->selected_forms[$index]['field_names'] = $form_fields['field_names'];
}
$view = $this->generateForm($form);
file_put_contents("{$this->temp_dir}/Views/form_{$form->id}.blade.php", $view);
}
$this->form = $form;
}