Can't limit checkbox selection

R

Rob Whittaker

I have a form that has a yes/no question and the answer can only be yes or
no, not both. I want to use checkboxes for this rather than options buttons.

My problem is how do i get Infopath to only allow the user to select either
yes or no, but not both. If they choose yes first then wanted to come back
and select no later then this would need to be enabled as well, the selection
is a constant either or state but never both.

I don't want to lock the unhecked checkbox as they need to be able to select
it later if they need to make a change to their original selection before
submitting the form.

I want to expand this idea to multiple checkboxes. I have made a section in
Infopath and added 2 checkboxes for a yes and no but do know how to create
this state of only being able to select one of the available checkboxes.
 
S

Shiva (GGK Tech)

Hello,

I am not about your requirement on checkbox? Do you want to add the multiple
checkbox options for same field? Once user checked the checkbox we should not
give option to uncheck it?
Based on the selection we have to give one more checkbox option to that
user? Can you give exact what is your requirement?
 
R

Rob Whittaker

Hi Shiva,
Thanks for the reply. This is an email form for student absences. There is a
question in the form that asks teachers

"Are there any students absent today?" and the answer would be
(checkbox goes here)"yes" (checkbox goes here)"No"

Only if yes is selected would a repeating table appear below so the details
of that student/s who are absent, their name, the reason for absence, return
to school date etc can be entered by the teacher, when done the form is
submitted.

The teacher needs to be able to select either the yes checkbox or the no
checkbox, in case they make a mistake, both can never be selected at the same
time as we would not know is a student was absent or not.

This is why a selection needs to able to be unchecked. Out of the possible
selections available I want our teachers to only be able to select one
answer.

The multiple checkbox idea is like this example
What is your favourite colour?
(checkbox goes here)"Red" (checkbox goes here)"Green"
(checkbox goes here)"Blue" (checkbox goes here)"Yellow"

Only one colour can be chosen, and for each colour a sepearte control is
displayed with questions relating to the favoutite color chosen.

I hope this is not too confusing to understand.
Thanks

Shiva (GGK Tech) said:
Hello,

I am not about your requirement on checkbox? Do you want to add the multiple
checkbox options for same field? no, each checklbox has only one binded field
Once user checked the checkbox we should not
 
S

SMS

Hi Shiva,
Thanks for the reply. This is an email form for student absences. There is a
question in the form that asks teachers

"Are there any students absent today?" and the answer would be
(checkbox goes here)"yes" (checkbox goes here)"No"

Only if yes is selected would a repeating table appear below so the details
of that student/s who are absent, their name, the reason for absence, return
to school date etc can be entered by the teacher, when done the form is
submitted.

The teacher needs to be able to select either the yes checkbox or the no
checkbox, in case they make a mistake, both can never be selected at the same
time as we would not know is a student was absent or not.

This is why a selection needs to able to be unchecked. Out of the possible
selections available I want our teachers to only be able to select one
answer.

The multiple checkbox idea is like this example
What is your favourite colour?
(checkbox goes here)"Red" (checkbox goes here)"Green"
(checkbox goes here)"Blue" (checkbox goes here)"Yellow"

Only one colour can be chosen, and for each colour a sepearte control is
displayed with questions relating to the favoutite color chosen.

I hope this is not too confusing to understand.
Thanks




Once user checked the checkbox we should not




- Show quoted text -

You could use Rules for each checkbox such that, if a checkbox is
checked, it will make the rest of the checkboxes unchecked.
 
R

Rob Whittaker

Your are a champion, this is exactly the behaviour I needed. Works like a
charm, i didn't know setting the value of other fields was possible like
this. I wish there was a detailed InfoPath site with visual examples and
demos of all the questions here!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top