I have a successfully working input field for a form that looks like this
HTML:
<li><input type="text" name="1" placeholder="answer #1"></li>
and I want to make it so that when a button is clicked a new input field is created mimicing the first but with incrementing numbers. The following code successfully does that, right up until the "placeholder" field in which it only shows the first word
JAVASCRIPT
$("#fieldList").append("<li><input type=text name=" + variable + " placeholder=answer #" + variable + "></li>");
I've tried various combinations of using " alongside standard " marks, but none of them are getting the formatting as the straight HTML version above shows. I feel like this is a basic syntactical error but I can't figure out what I'm missing.