0
我已經試過尋找他,但不幸我還沒有得到解決方案。希望有人能幫助我。我試圖讓這種選擇形式選定的輸入:獲取所選下拉列表的值Laravel 4
onewayflight.blade.php
{{ Form::label('adult','Adults: ') }}
{{ Form::select('adult', ['12+'=>'12+ years',
'1'=>'1','2'=>'2',
'3'=>'3','4'=>'4',
'5'=>'5','6'=>'6',
'7'=>'7','8'=>'8',
'9'=>'9','10'=>'10',
'11'=>'11','12'=>'12',
'13'=>'13','14'=>'14',
'15'=>'15','16'=>'16',
'17'=>'17','18'=>'18',
'19'=>'19','20'=>'20'],'1',array('class'=>'class="btn btn-default dropdown-toggle"')) }}
這就是我在我的控制器通過:
$a = Input::get('adult');
return View::make('content.onewayflightresults')->with('adult',$a);
我會怎麼扔在它可以在刀片模板上查看?
,但我只是想呼應,而不是製造出一個下拉列表中選擇的值。 – staphhelpme 2014-10-03 19:25:23
@staphhelpme它應該工作。你確定只在這部分代碼中使用這個視圖'content.onewayflightresults'嗎?看起來可能不是。 – 2014-10-03 19:30:04