Required Default Value Not Set

Kentico Dev1 asked on May 24, 2018 20:13

Using Kentico 10.0: I have a simple field, call it "Are you 18+" and I want it to be a Boolean (Yes/No) data type.

I also need it to be Required, but I want the user to specifically tell me if they are 18+. AKA actually force them to select either Yes or No. When I check the "Required" I lose the option to select not set as the Default Value.

Any ideas?

Recent Answers


Regis Wengel answered on May 24, 2018 23:16

Do you mean you want the 'no' value to be selected or none of the values to be selected? Either way I was able to replicated both instances with the 'required' value selected. Could you take a screenshot of the form and upload it?

0 votesVote for this answer Mark as a Correct answer

Peter Mogilnitski answered on May 24, 2018 23:40

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on May 25, 2018 01:33

There is a trick with this. Set the field to not required first then select no in the radio button list. Then make the field required. Then save. That should do the trick.

0 votesVote for this answer Mark as a Correct answer

Kentico Dev1 answered on May 25, 2018 15:39

@Regis - not quite. I need the radion buttons to default to "No Value", as in neither Yes or No is selected. Making it a required field would force a user to select either Yer or No...which doesnt appear to be an option.

0 votesVote for this answer Mark as a Correct answer

Kentico Dev1 answered on May 25, 2018 15:42

@Peter - I would have preferred a Dropdown but the request is for Radio Buttons. The feel its a more clean option to provide a visual Yes or No. Im not sure how much wiggle room I'll have on changing that unless the functionality of Radion Buttons doesnt exist

0 votesVote for this answer Mark as a Correct answer

Kentico Dev1 answered on May 25, 2018 15:44

@Brenden - that doesnt work. Currently the field is not required. When I select "No" and hit Save, then mark it as required and save, the value is "Yes" on the form.

Thanks though!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.