Millisecond Forums

Radiobutton "other" field response value persists until changed

https://forums.millisecond.com/Topic14767.aspx

By Konstantina - 10/29/2014

Hello,

I have a block with a surveypage that brances to several surveypages depending on how many radiobuttons are needed per page.
This is part of the data file where you can see that the value of the "radiobutton_1_1other" persists in the data unless it is changed.
The first time I have selected "Other" as an option and filled the textbox with the value "Other_2", while the second time I selected "book" but the "radiobutton_1_1other" has remained as "other_2" even though I didn't actually used the other textbox. How can I initialize the null value of the "radiobutton_1_1other" response, so when it is not used remains empty?

BlockCode TrialCode Response
PK1_block radiobutton_1_1 Other
PK1_block radiobutton_1_1other other_2
PK1_block test_trials_part2_1_promptsoption1 1
PK1_block test_trials_part2_1_promptsoption2  
PK1_block test_trials_part2_1_promptsoption3  
PK1_block test_trials_part2_1_promptsoption4  
PK1_block test_trials_part2_1_promptsoption5  
PK1_block radiobutton_1_1 book
PK1_block radiobutton_1_1other other_2
PK1_block test_trials_part2_1_promptsoption1 1
PK1_block test_trials_part2_1_promptsoption2  
PK1_block test_trials_part2_1_promptsoption3  
PK1_block test_trials_part2_1_promptsoption4  
PK1_block test_trials_part2_1_promptsoption5  

 Here is a sample of the code:

  <surveypage test_trials_part1>
  / ontrialbegin = [expressions.update_item_index]
  / ontrialbegin = [expressions.update_caption_index; expressions.update_radiobuttonsneeded; expressions.update_caption_text]
/ontrialbegin = [values.option1=getitem(counter.option1, values.item_index);]
/ontrialbegin = [values.option2=getitem(counter.option2, values.item_index);]
/ontrialbegin = [values.option3=getitem(counter.option3, values.item_index);]
/ontrialbegin = [values.option4=getitem(counter.option4, values.item_index);]
/ontrialbegin = [values.option5=getitem(counter.option5, values.item_index);]
  / questions = [1 = caption_macro]
  / stimulustimes = [1= within_block_progress_report, item_index_report, block_report, caption_report, buttons_report]
                / branch =  [if(values.radiobuttonsneeded==1) surveypage.test_trials_part2_1]
                / branch =  [if(values.radiobuttonsneeded==2) surveypage.test_trials_part2_2]
                / branch =  [if(values.radiobuttonsneeded==3) surveypage.test_trials_part2_3]
                / branch =  [if(values.radiobuttonsneeded==4) surveypage.test_trials_part2_4]
                / branch =  [if(values.radiobuttonsneeded==5) surveypage.test_trials_part2_5]
  / recorddata = false
  / finishlabel = "CONTINUE"
  / showbackbutton = false
  / showpagenumbers = false
  / showquestionnumbers = false
  / txcolor = (0, 0, 0)
  / nextbuttonposition = (15%, 90%)
  / navigationbuttonsize = (30%, 10%)
  / navigationbuttonfontstyle = ("Arial", 24, true, false, false, false, 5, 0)
  </surveypage>

<radiobuttons radiobutton_1_1>
/ caption = "Acceptable Responses"
/ options = ("WRONG", "<%values.option1%>")
/ other = "Other"
/ position = (1%, 1%)
/ size = (45%, 38%)
/ orientation = vertical
/ required = true
</radiobuttons>

<radiobuttons radiobutton_1_2>
/ caption = "Acceptable Responses"
/ options = ("WRONG", "<%values.option1%>", "<%values.option2%> ")
/ other = "Other"
/ position = (1%, 1%)
/ size = (45%, 38%)
/ orientation = vertical
/ required = true
</radiobuttons>

<surveypage test_trials_part2_1>
/ ontrialbegin = [surveypage.test_trials_part2_1.rightmargin=1px*(display.width/2)]
/ questions = [1 = radiobutton_1_1;2=prompts]
/ stimulustimes = [1=picture_macrovar]
/ recorddata = true
/ finishlabel = "NEXT"
/ showbackbutton = false
/ showpagenumbers = false
/ showquestionnumbers = false
/ txcolor = (0, 0, 0)
/ nextbuttonposition = (15%, 90%)
/ navigationbuttonsize = (30%, 10%)
/ navigationbuttonfontstyle = ("Arial", 24, true, false, false, false, 5, 0)
/ ontrialend = [values.item_number = substring(picture.picture_macrovar.currentitem,0,8)]
/ontrialend=[values.response_1_1=radiobuttons.radiobutton_1_1.selectedvalue]
/ontrialend=[values.response_1_2="";values.response_1_3="";values.response_1_3="";values.response_1_4;values.response_1_5=""]
</surveypage>


Your help is much appreciated.

Thank you in advance,
Konstantina
By Dave - 10/30/2014

This looks like a bug / design flaw. Unfortunately, there is no way for you to force the null value for the other option. Luckily, though, this shouldn't pose an actual problem. Clearly, whatever is recorded as response for radiobutton_1_1other can only be valid if the response for radiobutton_1_1 is "Other". This will allow you to easily discard any persisted responses from previous instantiations of the <radiobuttons> element during data analysis.
By Konstantina - 10/30/2014

Thanks for the reply Dave!