Is there a way to dynamically create text boxes based on a number input field with type='number'? Essentially, every time a user increments the number input, a new text box should be added to the backbone.js view. Additionally, when values are entered into these text boxes, I would like to store each value in an array within the backbone model. Here is a snippet of the code:
<label for='choices'># Choices for Students</label>
<input type='number' name='choices' step=1 />
initialize: function(opts) {
this.model = new QuestionCreateModel({
mode: null,
choices: ['A', 'B', 'C'],
Question: "Question goes here",
MaxChoices: 0,
MinChoices: 0,
WordLimit: 0,
CharLimit: 0,
}),
As you can see, I aim to use the number input field to populate the text boxes and assign values to the choices array in the Backbone model.
Thank you for any assistance provided!
-Stu