Hi guys,
I'm coming back to this issiue. I want to create a with answers in dropdown boxes...I'm using the Tony's code. The problem is that the column doesn't show up...just an empty space. This is a link to an example...
ayura.udea.edu.co/limesurvey/index.php/561473/lang-es
this is the code I'm using
Disponibilidad y estado actual de la infraestructura del nivel preescolar
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
var qID = {QID};
// Define the select element (dropdown)
var select1 = '<select class="insertedSelect"> \
<option value="">-- Please Choose --</option> \
<option value="Nuevo">Nuevo</option> \
<option value="Reparado">Reparado</option> \
<option value="Deteriorado">Deteriorado</option> \
<option value="Inservible">Inservible</option> \
</select>';
// Hide the text inputs
$('#question'+qID+' .answer_cell_004 input[type="text"]').hide().parent().hide();
// Insert the select elements
$('#question'+qID+' .answer_cell_004').append(select1);
// Initially select an option if the question has already been answered
$('#question'+qID+' .answer_cell_004 input[type="text"]').each(function(i){
if($(this).val()) {
$(this).closest('td').find('.insertedSelect').val($(this).val());
}
});
// Listener on the dropdowns - insert selected values into hidden text input
$('.insertedSelect').change(function() {
$(this).closest('td').find('input[type="text"]').val($(this).val());
});
});
</script>