Hi guys i am doing a mobile application about healthcare. I have to create a survey like application to screen the patients. Right now i have completed a part of the survey using radio button, the other part also look something like this(see picture below) but i want the radio button change to numeric textbox.
my application look something like this(attached)
right now i want to convert the radio button to a numeric textbox.
the question is: how can i make minimum code changes and replace all the radio button to numeric textbox?
Here are my code for the radio button
local radioGroup = display.newGroup() if(ebasRating\_Arr[i] == 0) then radioButton\_0 = widget.newSwitch { left = 565, style = "radio", initialSwitchState = true, id = tostring(i), width = 60, height = 60, onPress = setEBASRating0 } radioGroup:insert( radioButton\_0 ) radioButton\_1 = widget.newSwitch { style = "radio", id = tostring(i), initialSwitchState = false, width = 60, height = 60, onPress = setEBASRating1 } radioGroup:insert( radioButton\_1 ) elseif (ebasRating\_Arr[i] == 1) then radioButton\_0 = widget.newSwitch { left = 565, style = "radio", initialSwitchState = false, id = tostring(i), width = 60, height = 60, onPress = setEBASRating0 } radioGroup:insert( radioButton\_0 ) radioButton\_1 = widget.newSwitch { style = "radio", id = tostring(i), initialSwitchState = true, width = 60, height = 60, onPress = setEBASRating1 } radioGroup:insert( radioButton\_1 ) else radioButton\_0 = widget.newSwitch { left = 565, style = "radio", initialSwitchState = false, id = tostring(i), width = 60, height = 60, onPress = setEBASRating0 } radioGroup:insert( radioButton\_0 ) radioButton\_1 = widget.newSwitch { style = "radio", id = tostring(i), initialSwitchState = false, width = 60, height = 60, onPress = setEBASRating1 } radioGroup:insert( radioButton\_1 ) end radioButton\_0.y = 150 + (i \* 450) radioButton\_1.x = 18 + radioButton\_0.x+radioButton\_0.width radioButton\_1.y = 150 + (i \* 450) scrollView:insert( radioGroup ) end
i hope this is possible. Appreciate any help. Thanks