Survey: Webinar Experience and Lessons Learned
jQuery(function($) {
$('form#survey-7').bind('submit', function() {
$('#submit').attr("disabled", true);
});
$(':input.Other').bind('click', function() {
$(this).prev().prev().attr("checked", "checked");
});
// set the default survey error handler
$.fn.form.setErrorHandler('default', function(errors) {
var form = $(this);
// remove the error messages
form.find('.Widget div.Error').remove();
// foreach error, insert them
$.each(errors, function(errorIndex, error) {
// fields with the same name represent radio and checkboxes
var fieldsWithSameName = form.find('[name="' + error.field.attr('name') + '"]');
// put a error message after the widget title, but do it only once for each widget
if (fieldsWithSameName.index(error.field) == fieldsWithSameName.length - 1) {
//error.field.closest('.Widget').find('label:first').after('
' + error.message + '
');
error.field.closest('.Widget').find('label:first').after('
' + error.message + '
');
}
});
// focus the first error field
errors[0].field.focus();
// and alert the first error message
alert(errors[0].message);
$('#submit').removeAttr("disabled");
});
// initialize the survey validator
$('#survey-7').form().init({
errorClass : 'Required'
});
$('#survey-7').form().getFields().each(function() {
var field = $(this);
var label = field.closest('.Widget').find('label:first');
flabel = label.text();
flabel = flabel.replace(" *",""");
field.form().setErrorMessage('required', 'The "' + flabel + ' field is required.');
});
// language pack the error messages
$('#survey-7').form().setErrorMessage('required', "This field is required.");
// "Other" fields must not be empty if their corresponding
// radio button is checked
$('#survey-7 :input.Other').form().setDependency(function(field) {
if ($(this).siblings(':radio:checked, :checkbox:checked').length && $.trim($(this).val()) == '') {
$('#submit').removeAttr("disabled");
return false;
}
return true;
}, "Please type an answer in the text box next to the checked field.");
// disabling button on submit
//alert( $('.required:first').form().getErrorMessage() );
});
Webinar Experience Survey
Please answer these questions about your experience in attending webinars
How Often Do You Attend Webinars? *
Several Times Per Month
Once or Twice Per Month
Less than Monthly
Almost Never
Never
What Types of Webinars Have You Attended? *
Select All That Apply
For Work
For a Side Job/Business
For My Personal Development
For a Hobby or Topic I Enjoy
What Time Is Most Convenient For You To Attend A Webinar? *
Before my work day
Evenings
During Morning Business Hours
During Afternoon Business Hours
Weekends
If You Are Not In Front Of Your Computer Would You Still Call In For The Audio? *
Yes
No
Maybe
Which of the Following Engagement Activities Do You Feel Are Important in a Webinar? *
Check All That Apply
Live Q&A
Text Chat
Video Streaming
Access to Downloads and Files
Polls and Surveys
Other:
Submit Response
[image error]





