Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Making comment box mandatory for List With Comment question type

Making comment box mandatory for List With Comment question type 5 Monate 1 Woche her #106520

  • maxersloan
  • maxersloans Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 11
  • Karma: 0
Does anyone know of a way to make the comment box mandatory? The question type I am using is "List With Comment." I thought this would be simple/easy task, but I can't find answers anywhere (yet!).
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Making comment box mandatory for List With Comment question type 5 Monate 1 Woche her #106570

  • trivender
  • trivenders Avatar
  • OFFLINE
  • Expert Lime
  • Beiträge: 142
  • Dank erhalten: 6
  • Karma: 6
Past below code in question text source.If it will not work then give me survey link and question ID.

<script>
$(document).ready(function(){
$errorDiv = $('<br><div class = "errormandatory"></div>')
$('span.questionhelp:eq(0)').append($errorDiv)
$('button#movenextbtn').click(function(){
if($('textarea').val().trim() == "" ){
$('div.errormandatory').text('Please provide comment in box')
return false;
}
});
});
</script>
Trivender Singh
Survey Designer and Programmer
"I always suggest to have a group by group display layout and create a seprate group for each question. This will be extra work but you will get flexiblity to create your question by using more than more lime survey question types."
Letzte Änderung: 5 Monate 1 Woche her von trivender. Begründung: typo
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.124 Sekunden
Donation Image