0

I am using JQuery templates and I am binding data to the template. However if I have a string with a space in the word I do not see the entire contents display on the template.

Is there a simple conversion that I'm missing?

For example.

My object:

Object {MainText: "ABCD THE MAN", TextOverride: "ABCDTHE MAN", HideFromView: true}

My fields:

<input type="text" class="group-text" value=${MainText}></>
<input type="text" class="group-text" value=${TextOverride}></>
<input id="Checkbox1" class="hide-in-schedule" type="checkbox" value="${HideFromView}" />

However the result looks like this:

Group Text: ABCD
Text Override: ABCDTHE
1
  • 1
    You need to surround the value in the html with quotes. Like you are for the Checkbox1 Commented Nov 9, 2015 at 19:18

1 Answer 1

1

Try using quotes on html values:

<input type="text" class="group-text" value="${MainText}"></>
<input type="text" class="group-text" value="${TextOverride}"></>
<input id="Checkbox1" class="hide-in-schedule" type="checkbox" value="${HideFromView}" />
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. Didn't even catch that they were missing.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.