Page 1 of 1

make mandatory field

PostPosted: Mon Mar 16, 2015 7:54 pm
by skd
How to make actual time field mandatory in script?? Any examples with code??

Re: make mandatory field

PostPosted: Tue Mar 17, 2015 8:23 am
by Petr
Hello.
You should create a new before_add_message script with follow code
Code: Select all
if (message.getTime() == null || message.getTime() <= 0) {
    throw new UserException("Please fill the spent time field.");
}

Re: make mandatory field

PostPosted: Tue Mar 17, 2015 9:40 am
by skd
Thanks, it's works fine.