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 6194809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:21:33+00:00 2026-05-24T03:21:33+00:00

In a form, there are radio buttons for the user to select: <li> <label

  • 0

In a form, there are radio buttons for the user to select:

<li>
<label for="full professor"><span class="required">&##8727;</span>Is the candidate a full professor?</label>
    <input type="radio" name="fullProfessor" value="yes" tabindex="4" />Yes<input type="radio" name="fullProfessor" value="no" tabindex="5" checked/>No                                            </li> 

<li>
<label for="more than ten"><span class="required">&##8727;</span>Has the candidate been here for more than 10 years?</label>
<input type="radio" name="moreThanTen" value="yes" tabindex="6" />Yes<input type="radio" name="moreThanTen" value="no" tabindex="7" checked/>No                         </li> 

 <li>
<label for="past nominee"><span class="required">&##8727;</span>Has the candidate been nominated for this award in the last 3 years?</label>
<input type="radio" name="pastNominee" value="yes" tabindex="8" />Yes<input type="radio" name="pastNominee" value="no" tabindex="9" checked/>No                         </li> 

I’m not certain how to param them. The typical code I use is:

    <cfparam
    name="FORM.fullProfessor"
    type="string"
    default=""
    />

Is the type string even though it doesn’t accept a string like a textfield would?

To validate the radio button, is using:

        <!--- Validate campus address. --->
    <cfif NOT Len( FORM.fullProfessor)>
        <cfset ArrayAppend(
            arrErrors,
            "Error message here."
            ) />
    </cfif>

Lastly, maintaining the users’ selection after validating the page, how may I ensure this?

<cfif isDefined(form.fullProfessor) selected="yes">?

Thanks.

  • 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. Editorial Team
    Editorial Team
    2026-05-24T03:21:33+00:00Added an answer on May 24, 2026 at 3:21 am

    If you are using Yes and No you can treat them like booleans.

    <cfparam
    name="FORM.fullProfessor"
    type="string"
    default=false
    />
    

    and

     <cfif NOT FORM.fullProfessor>
        <cfset ArrayAppend(
            arrErrors,
            "Error message here."
            ) />
    </cfif>
    

    and

    <cfif form.fullProfessor selected="yes">
    

    You could also use a framework for validating your forms, I’d highly recommend validate this: http://www.validatethis.org/

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

Sidebar

Related Questions

I have a HTML form, which includes radio buttons that the user can select
How do I create a form where there are several radio buttons on the
I have a simple HTML form which consists of radio buttons where user has
I made a simple django form, with a list of choices (in radio buttons):
I have 5 radio buttons in my form, selecting one and proceeding takes me
I'm building a form with radio buttons. <form id=land name=input method=POST action=test.php> <input type=radio
I have a form which is made up of radio buttons. The link is
I have a form where user can select search criteria. The criterias are say:
I'm trying to have users enter info into a form (via radio buttons), manipulate
I have an account registration form where a user can select their account type.

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.