Expand my Community achievements bar.

How do you validate a radio button list?

Avatar

Level 1

Hi, I'm a complete novice with Livecycle so I'm hoping for a bit of help with validating a radio button list before printing is allowed.

I'm creating a form in Livecycle that has got a radio button list on it. The radio button list has seven options for the user to select from and each option has an item value from 1-7. I'd like to have the form confirm that one of these options has been selected by the user before the form is allowed to print.

IS it possible to do this and if so how would I go about it?

Many Thanks.

2 Replies

Avatar

Level 6

if u need only to vailate some button got selected or not on pre print this will works for ur problem.

validate the radio button list on pre print on the radio button group

----- form1.p.RadioButtonList::prePrint - (JavaScript, client) -------------------------------------

if(this.rawValue == "" || this.rawValue == " "){
xfa.event.cancelAction = 1;
xfa.host.messageBox("Please select a value to proceed further.", '1')
}

check the attached file.

Avatar

Level 1

Thanks for your reply, I'll give it a try as soon as possible and let you know how I get on.