Hi Meteormen,
I am trying to set the value of a textarea inside a modal (created with bootbox), but i can’t figure out. Instead of showing me the value of the variable, it shows me : {{this_question}}
.
Here is the code attached to the button to create the modal :
click #edit' : function (e) {
e.preventDefault();
console.log("edit");
var this_question = this.question;
console.log(this_question);
bootbox.dialog({
//title: "This is a form in a modal.",
message: '<html><form><textarea name="edit_form" rows="6" cols="70" >{{this_question}}</textarea></form></html>',
value: this_question,
buttons: {
success: {
label: "Save",
className: "btn-success",
callback: function () {
}
}
}
}
);
},
The console log (console.log(this_question)) shows the proper value (the actual question), but in the textarea of the modal, instead of the value (the question) it shows : {{this_question}}
If, by any chance, you could explain me why and how to fix, that would be fantastic!
Discloser, I am quite new to Meteor.