Question

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');

Was it helpful?

Solution

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".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top