@@ -123,22 +123,22 @@ check_question <- function(answer,
123123
124124 UI_part <- lapply(seq_along(options ), function (i ){
125125 htmltools :: tagList(
126- htmltools :: tags $ input(type = type ,
127- name = glue :: glue(" answer_{q_id}" ),
128- id = glue :: glue(" answer_{q_id}_{i}" ),
129- value = ifelse(inherits(options [i ], " list" ), i , options [i ])),
130- htmltools :: tags $ label( options [i ]),
126+ htmltools :: tags $ label( htmltools :: tags $ input(type = type ,
127+ name = glue :: glue(" answer_{q_id}" ),
128+ id = glue :: glue(" answer_{q_id}_{i}" ),
129+ value = ifelse(inherits(options [i ], " list" ), i , options [i ])),
130+ options [i ]),
131131 if (alignment == " vertical" ){htmltools :: tags $ br()})
132132 })
133133
134134 } else if (type == " checkbox" & ! is.null(options )){
135135
136136 UI_part <- lapply(seq_along(options ), function (i ){
137137 htmltools :: tagList(
138- htmltools :: tags $ input(type = type ,
139- id = glue :: glue(" answer_{q_id}_{i}" ),
140- value = ifelse(inherits(options [i ], " list" ), i , options [i ])),
141- htmltools :: tags $ label( options [i ]),
138+ htmltools :: tags $ label( htmltools :: tags $ input(type = type ,
139+ id = glue :: glue(" answer_{q_id}_{i}" ),
140+ value = ifelse(inherits(options [i ], " list" ), i , options [i ])),
141+ options [i ]),
142142 if (alignment == " vertical" ){htmltools :: tags $ br()})
143143 })
144144 } else if (type == " in_order" & is.null(options )){
0 commit comments