{% Dim inputName = CurrentQuestion.InputName() Dim inputValue = CurrentQuestion.InputValue() Dim datalist = CurrentADC.PropValue("datalist").Split("|") Dim attrList = On(datalist.Count > 0, "list=\"" + inputName + "\"", "") Dim i Dim inputType = CurrentADC.PropValue("opensubtype") Dim multiline = (CurrentADC.PropValue("multiline") = "1") ' Convert to boolean Dim maxValue = CurrentQuestion.MaxValue Dim attrMax = On(maxValue <> DK AND maxValue > 0, "maxLength=\"" + maxValue + "\"", "") Dim placeholder = CurrentADC.PropValue("placeholder") Dim attrPlaceholder = On(placeholder <> "", "placeholder=\"" + placeholder + "\"", "") Dim attrRequired = On(CurrentQuestion.IsAllowDK, "required=\"required\"", "") If inputType = "text" And multiline Then %} {% Else %} {% If datalist.Count > 0 Then %} {% For i = 1 To datalist.count %} {% EndIf %} {% EndIf %}