Hello , thank for asking. However i am only tasked to modify the code for the plugin instead of the 'global section' , but is there anyway to put it in the 'globals' section just by modifying the code in the plugin ?
var TextConfirmation = ComponentView.extend({
events: {
'click [type="checkbox"]': 'onConfirmation',
'keyup .component-item input':'onKeyPress'
//This is new Code
}
onKeyPress: function(event) {
if (event.which !== 13) return;
//<ENTER> keypress
this.getDatabaselink(event);
//This is new Method
}
getDatabaselink: function() {
datalink = Adapt.course.get('_globals')._components._textConfirmation.Database
console.log("datalink "+ datalink)
//This is a new Method
}
I have created these few functions in order to retrieve the value from the text confirmation, however its is not calling when i pressed enter? is there anyway that i can call this function
datalink = Adapt.course.get('_globals')._components._textConfirmation.Database
Does this method retrieve just the string from textconfirmation ? or it retrieve the whole textconfirmation