문제

I have the following dropdownlist/ selectlist in my form:

<select class="form-control" id="properties" name="properties1"><option value"35" disabled>white  (Sold Out)</option><option value"36" disabled>yellow  (Sold Out)</option><option value"37" >blue </option></select>   

Why is this returning the value between the option tags instead of the value of the options? I need the Id's ofcourse.

I am using Laravel and process this form data with this tag: Input::get('properties');

도움이 되었습니까?

해결책

That's because the syntax of the HTML is wrong.

You are missing the equals sign between the attribute names and attribute values. The value"35" should be value="35".

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top