Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 166929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:11:03+00:00 2026-05-11T12:11:03+00:00

We have a registration form that asks for demographic information with the additional option

  • 0

We have a registration form that asks for demographic information with the additional option to not provide any information. However, to keep our numbers adding up properly, we want to require you to enter all information if you select any demographics. A rendering of the form:

  • Gender
    • ( ) Male
    • ( ) Female
  • Disabilities?
    • ( ) Yes
    • ( ) No
  • Race
    • ( ) A
    • ( ) B
    • ( ) C
  • ( ) I do not wish to provide demographic information

We want to allow selection of ‘I do not wish…’ and all options, e.g. ‘Male/Yes/A’, but not partial answers, e.g. ‘Female/C’.

How can we structure the .validate() rules and options to achieve this goal? Ideally, we would have a single label show/hide if your response is not sufficient.

Additional information:

  • Using the jQuery Validation Plugin
  • Demographics types are dynamically created from a database list
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T12:11:04+00:00Added an answer on May 11, 2026 at 12:11 pm

    I’m assuming that you are using the jQuery validation plugin. If so, what you want is a custom require rule with a dependency check that allows you to make the inputs required iff the user does not choose to opt out. You might want to have a click handler on the opt-out that clears the other fields so that you don’t have to check for partial entries when the user does choose to opt out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a product registration form that allows the user to add additional product
We have functionality on our registration form that uses an AJAX call to check
I have a basic form that I'm using for member registration. I'm using the
I have a registration form that when the user enters in valid registration data
I have a user registration form that has a password and confirm password field.
I have a working PHP registration form that goes through $_POST[] requests to check
I'm working on a simple mobile site that have a registration form for Interest,
I have a registration form that i'm creating. In my html file, I have
I have a registration form that is rendered by the following urlconf -- url(r'^$',
I have a big registration form that I've devided with jquery cycle so you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.