- Posts: 4
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // Identify some elements var thisQuestion = $('#question{QID}'); var surveyRoot = location.pathname.split('index.php')[0]; // Row to insert the timepicker var timeRow = 2; // Define the timepicker function insertPicker() { $('li.question-item:eq('+(timeRow-1)+') input[type="text"]', thisQuestion).datetimepicker( { minInterval: (1000*60*60), // 1hr dateFormat: 'dd M yy', timeFormat: 'HH:mm', start: { }, // start picker options end: { } // end picker options }); } // Insert the timepicker if (!$.isFunction($.fn.timepicker)) { $('head link[rel="stylesheet"]').last().after('<link rel="stylesheet" href="'+surveyRoot+'third_party/jquery-ui-timepicker-addon/jquery-ui-timepicker-addon.css" type="text/css" media="screen">'); $.getScript( surveyRoot+'third_party/jquery-ui-timepicker-addon/jquery-ui-timepicker-addon.js', function( data, textStatus, jqxhr ) { insertPicker(); }); } else { insertPicker(); } }); </script>
You cannot do that - the rows are either all text inputs (single-row) or textareas (multi-row);how can I make it so that one of the rows (in particular, it is the 3rd row) shows more rows available for text input?
var surveyRoot = location.pathname.split('index.php')[0];
var surveyRoot = "{TEMPLATEURL}../../../
var surveyRoot = "{SURVEYRESOURCESURL}../../../
Q1: <script type="text/javascript" charset="utf-8"> $(document).ready(function() { // Identify some elements var thisQuestion = $('#question{QID}'); // Row to insert the timepicker var timeRow = 2; // Insert the timepicker $('li.question-item:eq('+(timeRow-1)+') input[type="text"]', thisQuestion).datepicker({ dateFormat: 'mm-yy', minDate: new Date("February 01, 2016"), maxDate :new Date("May 31, 2016") }); }); </script>