Good afternoon I have a stored process which has a dropdown list that feeds off a table and displays one question at a time. I need to put a text box next to the drop down, but cannot get it to work properly. The drop down list displays on top instead of inside the drop down space (see image attached). My original Code: data _null_; file _webout; set onequestion_&i end=eof; by Drop_Down_Selection; if _n_=1 and Drop_Down_Selection not in ('Free text') then do; put '<tr><td><table border=1 width=100%>'; put '<td class="TD2" width=100%>' questions '</td>'; put '<td colspan=1><select style="text-align: right" name="dropdowntp" id="dropdowntp">'; end; if _n_=1 and Drop_Down_Selection in ('Free text') then do; put '<tr><td><table border=1 width=100%>'; put '<td class="TD2" width=100%>' questions '</td>'; end; if first.Drop_Down_Selection and Drop_Down_Selection not= 'Free text' then if "&answer." = Drop_Down_Selection then put '<option value="' Drop_Down_Selection '"' Drop_Down_Selection ' selected>' Drop_Down_Selection '</option>'; else put '<option value="' Drop_Down_Selection '"' Drop_Down_Selection '>' Drop_Down_Selection '</option>'; if first.Drop_Down_Selection and Drop_Down_Selection = 'Free text' then put '<td><input type="text" id="dropdowntp" name="dropdowntp" value='"&answer."'></td>'; if eof then do; put '</select></td>'; put '</td></td></table>'; end; run; Changed code: data _null_; file _webout; set onequestion_&i end=eof; by Drop_Down_Selection; if _n_=1 and Drop_Down_Selection not in ('Free text') then do; put '<tr><td><table border=2 width=100%>'; put '<td class="TD2" width=100%>' questions '</td>'; put '<td colspan=1><select style="text-align: right" name="dropdowntp" id="dropdowntp">'; put '<td><input type="text" id="dropdownmul" name="dropdownmul" value='"&answer."'><tr></td>'; end; if _n_=1 and Drop_Down_Selection in ('Free text') then do; put '<tr><td><table border=1 width=100%>'; put '<td class="TD2" width=100%>' questions '</td>'; end; if first.Drop_Down_Selection and Drop_Down_Selection not= 'Free text' then if "&answer." = Drop_Down_Selection then do; put '<td><option value="' Drop_Down_Selection '"' Drop_Down_Selection ' selected>' Drop_Down_Selection '</option>'; put '<input type="text" id="dropdownmul" name="dropdownmul" value='"thisone"'></td>'; end; else do; put '<option value="' Drop_Down_Selection '"' Drop_Down_Selection '>' Drop_Down_Selection '</option>'; end; if first.Drop_Down_Selection and Drop_Down_Selection = 'Free text' then put '<td><input type="text" id="dropdowntp" name="dropdowntp" value='"&answer."'></td>'; if eof then do; put '</select></td>'; put '</td></td></table>'; end; run;
... View more