make mandatory field

Discuss problems installing or using TrackStudio.

make mandatory field

Postby skd » Mon Mar 16, 2015 7:54 pm

How to make actual time field mandatory in script?? Any examples with code??
skd
 
Posts: 9
Joined: Fri Feb 27, 2015 9:54 am

Re: make mandatory field

Postby Petr » Tue Mar 17, 2015 8:23 am

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.");
}
Учи Java и ищи работу вместе с www.job4j.ru
Petr
 
Posts: 2914
Joined: Wed Aug 12, 2009 4:38 pm

Re: make mandatory field

Postby skd » Tue Mar 17, 2015 9:40 am

Thanks, it's works fine.
skd
 
Posts: 9
Joined: Fri Feb 27, 2015 9:54 am


Return to TrackStudio Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron