lundi 25 janvier 2016

Laravel 5 - inserting old data into form via variable

I have a slight problem. I have a system whereby I can drag and drop my own forms. The html code for a form is saved in my database. When it comes to the edit page, I do something like the following

{!! Form::model($project->document, [
    'class'=>'form-horizontal',
    'method' => 'PATCH',
    'route' => ['projects.documents.update', $project, $document->id]
]) !!}


{!! $documentData->documentData !!}

<div class="form-group">
    {!! Form::submit('Save Data', ['class' => 'btn btn-primary']) !!}
</div>

{!! Form::close() !!}

$documentData->documentData contains the html code for this particular form.

Now my problem is, $documentData->form_data contains the old inputs for this form.

Is there any way to get this old input into the form, the way I am currently handling things?

Thanks



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire