Form::text('option'.[$key]['name']
that looks bad syntax, try this: Form::text( 'option[' . $key . '][name]',
arcollector said:
Form::text('option'.[$key]['name']
that looks bad syntax, try this:Form::text( 'option[' . $key . '][name]',
I have update my syntax. Thanks.
Actually is on Input::old('option')[$key][$session['name']]
how do I get the value of this input?
It's return to Undefined index: name
Input::old('options')[$key][$session['name']]
????
arcollector said:
Input::old('options')[$key][$session['name']]
????
Sorry, syntax update.
well $session
hasn't an index called 'name'
try dd( $session )
and check its output
arcollector said:
well
$session
hasn't an index called'name'
trydd( $session )
and check its output
have 'name'
on the current array. array(3) { ["'name'"]=> string(8)...
looking your code
@foreach( Input::old('option') as $key => $session )
{{ Form::text('option[' . $key . '][name]', Input::old('option')[$key][$session['name']] ) }}
@endforeach
I dont like the Input::old('option')[$key][$session['name']]
why don't just write this $session['name']
???
arcollector said: I dont like the
Input::old('option')[$key][$session['name']]
why don't just this$session['name']
???
Actually just $session['name]
but still get the ErrorException : Undefined index: name
I'm looking for the same problem at http://forumsarchive.laravel.io/viewtopic.php?pid=21058#p21058
The var_dump will return to Undefined index
too.
mmm, try this
isset( $session['name'] ) ? $session['name'] : 'some default value'
arcollector said:
mmm, try this
isset( $session['name'] ) ? $session['name'] : 'some default value'
Ouch!!.. My bad. I put ["name"]
to my form. That's why Undefined index. Thank you arcollector.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community