Search code examples
htmlinputnamespacestagslabel

How to name HTML Input id name for a input question "I don't have a preference"


My question of the day: I am working on a fake dating website and ask the user what their interested gender is and provide them the option to say they do not have preference. I want a logical and readable id name. I have made interest-none but is there a better option for naming this certain case scenario?

<input class="form-check-input" type="radio" name="interested-gender" id="interest-none" checked>
<label class="form-check-label" for="interest-none">
 I don't have a preference
</label>

Solution

  • Your question would probably be closed after being flagged as "opinion-based".

    But naming is one of the most difficult things in development and I personally think it's totally fine to ask for a name suggestion from other developers. If StackOverflow is not the right place to ask for other developers' suggestions, what is?

    Here are some suggestions from me:

    no-preference
    interest-no-preference
    interest-neutral