mercredi 3 octobre 2018

Laravel 5 - Pre-Populate form using 'old'

I have a form input for editing an existing entry in a Laravel 5 app like this..

<input name="obj_email" type="text" value="">

This works correctly and when the form loads it pre-populates the value, but if some form validation fails, when the page reloads it loses the email that I entered.

I tried to fix it by doing this..

<input name="obj_email" type="text" value="">

This works and it now does not lose the value when validation fails But it does not pre-populate the form on initial load anymore.

Where am I going wrong?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire