[Fixed]-Passing a value with whitespace from an html page to a view

1👍

Put double quotes around the value otherwise the browser is going to interpret the field as set to empty as such: (yes, I’m using ” thing.name” as the value for thing.name – not confusing at all)

<option value="" thing.name=""> thing.name</option>

With the quotes it’ll be interpreted as:

<option value=" thing.name"> thing.name</option>

So just add a couple doublequotes and you’ll be golden.

<option value="{{thing.name}}">{{ thing.name }}</option>

Leave a comment