Transform all required field label [done]
Posted: Wed Aug 23, 2023 5:33 am
Hi,
The following function will transform all required field label with *
.
The function can be called in individual edit forms js or in the header for all forms.
Just sharing to the forum.
Regards
Nilesh
The following function will transform all required field label with *

Code: Select all
function tansformRequiredField(){
var o = nuSERVERRESPONSE.objects;
for (let i = 0; i < o.length; i++) {
let id = o[i].id;
if (o[i].valid == '1'|| o[i].valid == '3'){
$("#label_" +id).append('<span style="color:red;">*<span/>');
$("#label_" +id).attr('title',nuTranslate('Required field.'));
}
}
}
Just sharing to the forum.
Regards
Nilesh