Laravel-auto-form-generator
Laravel-auto-form-generator copied to clipboard
Initial value for text inputs
Currently, there is not a way (that I can see) to set an initial value on a text input. I have looked at the code and have inserted the following into the switch statement:
case 'text':
if ($this->getContentBefore($fieldName))
$data[] = $this->getContentBefore($fieldName);
if ($this->getSettings('showLabels')) {
$data[] = $this->form->label($fieldName, $this->getLabelText($fieldName) . ':');
}
if ($this->getSettings('types', $fieldName, 'value'))
$data[] = $this->form->input($type, $fieldName, $this->getSettings('types', $fieldName, 'value'), $extras);
else
$data[] = $this->form->input($type, $fieldName, null, $extras);
if ($this->getContentAfter($fieldName))
$data[] = $this->getContentAfter($fieldName);
break;
I don't want to add my code into your file in case of future updates. Is this something that can be added?