creating input form items dynamically not showing
I'm making a call to the back-end which returns one or more values. I'd like to use the return values as input/ checkbox items. Here's how I've implemented this thus far:
- $.mobile.changePage("#establishRelationship", "slide", false, true);
- checkboxMarkup += "<input type='checkbox' name='${name}' id='${id}' class='inputs' />";
- checkboxMarkup += "<label for='${id}'>${name}</label><br />";
- $("#establishRelationshipControlGroup").empty();
- $.each(km.core.currentRelationships, function(cnt) {
- arr.push({
- "name": km.core.currentRelationships[cnt],
- "id": ("rel-" + cnt)
- });
- });
- $.template("checkboxTemplate", checkboxMarkup);
- $.tmpl("checkboxTemplate", arr).appendTo("#establishRelationshipControlGroup");
- $('input').checkboxradio("refresh");
This does not produce the desired outcome. I get regular, unformatted html checkboxes. Not like the formatting you see
here.
Suggestions?