Custom HTML - Script to fill a field on value changed
Confluence User - 20 Aug, 2018
Hello,
I wrote the following script in a "Custom HTML" field to fill a field with part of the filename when a file is selected.
It worked perfectly in Version 8 of Joget, but since version 9, it doesn't. Could someone help ?
Thank you in advance.
Daniel
<script>
//when File is selected (field "attachment" is changed)
$('#attachment').change(function(){
var f1 = FormUtil.getField("cb");
var t = FormUtil.getValue("attachment").split(/[\\\/]/).pop();
t = t.split(".")[0];
$(f1).val(t); //set value
});
</script>
forms