Expand my Community achievements bar.

radio button exclusion group: Type List User Entered - Required

Avatar

Former Community Member
Hi there,



I have a problem with radio button exclusion group.



I need a Radio button list, all unchecked, and the user need to choose one option. Only when the user choose one radio button, the button submit permit submit data. If all radio are unchecked, the sumbmite button cancel the submit.



Regards,
8 Replies

Avatar

Former Community Member
You'll probably find it easier to start with the submit button as read only so it cannot be clicked on. Then put a script on the change event of the exclusion group so that when a choice is made the button is made clickable.



Chris

Adobe Enterprise Developer Support

Avatar

Former Community Member
Thanks for your fast reply.<br /><br />I try in the Tab Value:<br />Type: User Entered - Required, <br />with default value: <none> and <br />Empty Message: Please check radio botton<br />and not work.

Avatar

Former Community Member
Good point, it doesn't seem to be working properly. I'll investigate further and log a bug if need be. In the meantime I'd suggest using my approach of having the submit read only until a choice is made as a workaround.



Chris

Adobe Enterprise Developer Support

Avatar

Level 6
Chris's suggestion is a good one, but it has a drawback. The user won't know why the submit button is disabled. Another option is to do as follows, which gets around the limitation that a submit button cannot have a click event:



1) Make your submit button invisible

2) Create a normal button with script that checks for a value in the radio button group. If nothing is selected, display a message that instructs the user. If there is something selected in the radio button grouping, submit the form by programatically clicking the hidden submit button. I believe the JavaScript is btnSubmit.execEvent("click");



Hope this helps.



Jared Langdon

J. Langdon Consulting, Inc.

Avatar

Former Community Member
Good one yours suggestion too.

The reality is the Adobe LiveCycle Designer have a lot of things that will be to do, but not to do.

In Adobe LiveCycle Designer, exclusion groups have User Entered - Required property, but when I want use that funcionality that d'ont work.

To make more complex document I need a lot of workaround to reach the target.



Thank´s a lot Jared and Chris

Avatar

Former Community Member
I can say for a fact that the problem where radio button groups can't be "required" is a bug that has been logged and is being looked into.



We appologize for the inconvenience. Thank you to Jared and Chris for suggesting temporary work-arounds while we work to resolve this problem.



Stefan C.

Adobe Systems

Avatar

Former Community Member
Not being experienced in JAVAScript, what code would I need to add to enable a group of 5 radio buttons be user required for entry. I have an Email Submit button on the form, but the user can submit the form without checking a radio button. When a radio button is checked, its value is a text string, not a number.

Avatar

Former Community Member
The script isn't too complicated. The problem is that you have to get around the fact that Acrobat will always let a form with a radio button group flagged as mandatory be submitted regardless of whether a radio button within the group has been selected prior to submission.



You can do this by using two buttons: The first is a regular (non-submitting) button while the second is the actual email submit button. The catch is that the real email submit button is hidden (it can't be seen on the form, nor can it be clicked on by the user).



The first step, which isn't really necessary but would be good practice, would be to mark the radio button group which contains the radio buttons as being mandatory. You can do this by selecting any of the radio buttons in the group which should be mandatory, going to the Object palette and setting the Type property to
User Entered - Required. This will have the effect of Acrobat being able to highlight the radio buttons in red if the user chooses to "Highlight required fields" when filling the form.



The second step is setting-up the two buttons. This step is identical to the second step described in the following thread (about making a check box mandatory for email submission):
Mandatory check box before form submission. Have a look at the first reply to the thread. You should start reading at the paragraph that begins with, "The second part..."



The script checks that the value of the check box is "1". Your script would simply check that the radio button group's rawValue property isn't an empty string.



Stefan

Adobe Systems