Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a form with a checkboxlist that has several choices. Because the person who requested this form also wants a choice "Other" with an associated textbox to explain the choice, I added "Other" as a checkbox.

I need to validate on submit, that either one item from the checkboxlist or the checkbox has been chosed.

Is there an easy way to do this? Or, let me rephrase, is there any way to do this?

  • Moderators
Posted

You can do this using JavaScript; on the submit button create a validation script (using JS), something like the OnClick event.

btw, you should also validate on the server-side code as well.

 

If you need help with the JS code let me/us know.

Visit...Bassic Software
Posted

I was going to try incrementing an integer value for each checkbox that is checked and writing it to a textbox which would be validated on submit but I can't get the textbox to automatically update.

Would this be a workable solution?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...