Search the Legacy Support Archive (up to v2020)
  1. Read-only archive (2005–2024). Posting is closed. Need help with MediaLab or DirectRT 2027? Email service@empirisoft.com.

    All words · “exact phrase” · -leave out

    Advanced search

Radio buttons returning "ok" rather than value (case 25205)

  1. #1

    Radio buttons returning "ok" rather than value (case 25205)

    I've got a question with 3 radio buttons. I've tried a number of things, but all I ever get in the variable data file is "ok." Here is the code:<html>
    <body>

    <form name="form" method="post">

    What is your answer?<br />
    <input type="radio" name="choice" value="1">One<br />
    <input type="radio" name="choice" value="2">Two<br />
    <input type="radio" name="choice" value="3">Three<br /><p/>

    <input type="submit" value="Submit">
    </form>
    </body>
    </html>

    In my questionnaire file, I tried setting the item type to both "HTML" and "Custom," but neither worked.

    What factors could contribute to the problem?

  2. #2
    I don't see a line like this one in your code:

    <input name="textbox1">

    Replace textbox1 with the name of the item in your .que file and MediaLab should write the response to the data file.

    You should be able to insert this anywhere like before the input type line of code.

  3. #3
    If I add that code, it just adds a textbox. I'm hoping to just use the radio buttons. I can get data from textboxes to work, but not radio buttons.

  4. #4
    I'd like to see your .que file and the .htm file. Please either upload them here or send them support@empirisoft.com and reference case 25205.

  5. #5
    I did some testing, and it turns out that it wasn't related to having an additional <input> tag. The problem was that the number in the "WriteText" column needs to match the number of radio button options offered. I had three choices, and the WriteText field defaults to 2. When I changed it to 3, it worked perfectly. I couldn't find anything in the manual about this field, and all questions in the forum about "WriteText" pointed to "write as text," which is different.

  6. #6
    Now I am having trouble with checkboxes. I have to make a selection and click "submit" the same number of times as there are options (so 3 options=submit 3 times). Is this related to the WriteText field, too? I was having the same issue with radio buttons before, but fixing the "writeText" field fixed that. Do you have a description of what the WriteText field does?

  7. #7
    I'd like to see your .que file and the .htm file that use the checkbox. Please either upload them here or send them support@empirisoft.com and reference case 25205.