How to prevent submission of a record producer if the user has not checked the right answer?

Mike Strik
Tera Guru

Hi all!

I'm kinda new at the community here. I hope you can help me out.

I'm trying to prevent submission of a record producer if the user has not checked the right answer.

By searching in the community I found out this can be done by a "onSubmit Catalog Item Script"

I tried the following;

if(g_form.getValue('fiber_tsg') == 'No') {        //fiber_tsg is my record producer
       alert('Please follow the configuration guide before proceeding.');
	   return false;
}

I'm getting the following error: 

find_real_file.png

Can anyone help me out?

Thanks in advance!

1 ACCEPTED SOLUTION

Michael Fry1
Kilo Patron

Your script is missing the function:

function onSubmit() {
   //Type appropriate comment here, and begin script below
   
}

Try adding that and then your code between the {}.

View solution in original post

2 REPLIES 2

Michael Fry1
Kilo Patron

Your script is missing the function:

function onSubmit() {
   //Type appropriate comment here, and begin script below
   
}

Try adding that and then your code between the {}.

Mike Strik
Tera Guru

Thats it!

 

Thanks!