Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Laravel 5.0 Getting Old Values In the form

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 444
    Comment on it

    Many times we need to show our old values in a form after an error or validation stops our form from submitting. Laravel has a very nice way of retaining old values and populating it back into our form.

    I myself used it in a drop down, where I want to show the user the same selected value again when form did not submit properly.

    Syntax :-

    Simple Form Syntax <input type="email" class="form-control" name="email" value="{{ old('email') }}"> Laravel Form Syntax {!! Form::text("email", old('email'), array("placeholder" => "Your Valid Email Address")) !!}

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: