Hi ,
I am trying to make a custom field mandatory based on the value of another custom field using SIL script.
if (argv["customfield_17000"] == "Digital ad" ){
lfShow("customfield_18600"); //Gifs or HTML5
lfShowFieldMessage("customfield_18600", "Field is required", "WARNING");
lfShow("customfield_18601"); //Maximum file size
lfShowFieldMessage("customfield_18601", "Field is required", "WARNING");
lfDisable("editSubmit");
But submit button is not getting disabled. Please help me to resolve this
Hello,
It should be like this:
if (argv["customfield_17000"] == "Digital ad" ){
lfShow("customfield_18600"); //Gifs or HTML5
lfShowFieldMessage("customfield_18600", "Field is required", "WARNING");
lfShow("customfield_18601"); //Maximum file size
lfShowFieldMessage("customfield_18601", "Field is required", "WARNING");
lfDisable("editSubmit");
}
You forgot closing parenthis.
Also how did you connect this hook?
lfWatch("customfield_17000", {customfield_17000"}, "yoursilfile.sil");
What is the customfield_1700 type?
Hi,
Sorry i missed to add the parenthesis here. customfield_17000 is a single -select select list type.
I added this script to main script and executed as Live field.
Field messages are getting displayed but Submit button is not getting disabled. I referred this document
https://confluence.cprime.io/display/TR/Make+a+custom+field+required+based+on+another+custom+field
Regards,
Madhura
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.