Position of other box in radiobutton


Author
Message
Jeff
Jeff
Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)
Group: Forum Members
Posts: 49, Visits: 123
I'm trying to limit a radiobutton element to the top-left side of the screen:

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

 
But when the "Other" option is selected, the resulting text box is always placed on the right side of the screen, which sometimes overlaps with the image that we want on the right side of the screen:  

https://www.millisecond.com/forums/uploads/images/08c5b916-bd48-4154-86e4-92ad.png


Is there a fix for this? I've tried replacing 
/ other = "Other"
with a textbox, but so far, no luck with that strategy either. 

Thanks,
Jeff

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
The position of the "Other" textbox implicitly depends on the longest option listed in the /options attribute. In your case, the long inline expression

/ options = ("WRONG" ,"<% getitem(counter.option1,values.item_index) %>" )

pushes the box out to the right. Here's how to get around that:

<values>
/ item_index = 1
</values>

<surveypage pg1>
/ questions = [1=rb1]
/ showpagenumbers = false
</surveypage>

<radiobuttons rb1>
/ caption = "A caption"
/ options = ("A", "<%getitem(counter.option1,values.item_index)%>")
/ other = "Other"
/ position = (1%, 1%)
/ size = (45%, 38%)
/ orientation = vertical
/ required =  true
</radiobuttons>

<surveypage pg2>
/ ontrialbegin = [radiobuttons.rb2.option.2 = getitem(counter.option1,values.item_index)]
/ questions = [1=rb2]
/ showpagenumbers = false
</surveypage>

<radiobuttons rb2>
/ caption = "A caption"
/ options = ("A", " ")
/ other = "Other"
/ position = (1%, 1%)
/ size = (45%, 38%)
/ orientation = vertical
/ required =  true
</radiobuttons>

<block myblock>
/ trials = [1=pg1; 2=pg2]
</block>

<counter option1>
/ items = ("B", "C", "D")
/ select = noreplace
</counter>

Observe the difference between pg1/rb1 (which replicates your current setup) and pg2/rb2 which sets the option via /ontrialbegin instead of using an inline expression.

Jeff
Jeff
Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)Guru (9.2K reputation)
Group: Forum Members
Posts: 49, Visits: 123
Thanks, Dave.  Worked like a charm!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search