I do have a part of the code for the inputs:
var input1 = new TextInput({
"id": "input1",
"default": "\"\"",
"searchWhenChanged": false,
"value": "$form.userid$",
"el": $('#input1')
}, {tokens: true}).render();
input1.on("change", function(newValue) {
FormUtils.handleValueChange(input1);
});
var input2 = new TextInput({
"id": "input2",
"default": "\"\"",
"searchWhenChanged": false,
"value": "$form.racf$",
"el": $('#input2')
}, {tokens: true}).render();
input2.on("change", function(newValue) {
FormUtils.handleValueChange(input2);
});
And I have referenced the same IDs in the clear_fields() function (as in the original post). I tired the below code as well:
$('input1').val('');
$('input2').val('');
Neither way it works.
... View more