The nice thing about SSI Web is there is often more than one way to accomplish a task. Below are three different methods to identify a respondent's age.
Select Question: Age Groups
You could create a select question that has multiple age options as well as a "I prefer not to answer" option. For example:
You could create a numeric question. In the settings section, you can specify and minimum value, a maximum value, as well as a value for a "I prefer not to answer option." For example:
if ((SSI_GetValue("age_1_other") < 18) || (SSI_GetValue("age_1_other") > 74))
strErrorMessage = "You must enter a number between 18 and 74.";
Here's what the question would look like if you typed in a value that was too low: