Skip to content
Snippets Groups Projects
Commit ffd6af92 authored by Fredrik Jonsson's avatar Fredrik Jonsson
Browse files

Added word limit to the application form copy script.

parent 30bd05e7
No related branches found
No related tags found
No related merge requests found
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
var help_text = $(this).find('.form__help').html(); var help_text = $(this).find('.form__help').html();
var $help_link = $(this).find('.form__help-link'); var $help_link = $(this).find('.form__help-link');
var word_limit = $(this).attr('data-word-limit');
var $input_list = $(this).find('.form__item > ul > li'); var $input_list = $(this).find('.form__item > ul > li');
var input_text = $(this).find('input').val(); var input_text = $(this).find('input').val();
var rich_text = $(this).find('.tinymce4-editor').val(); var rich_text = $(this).find('.tinymce4-editor').val();
...@@ -36,6 +37,10 @@ ...@@ -36,6 +37,10 @@
question_text = question_text + '\n\n' + strip($help_link.html()) + ' <' + $help_link.find('a').attr('href') + '>'; question_text = question_text + '\n\n' + strip($help_link.html()) + ' <' + $help_link.find('a').attr('href') + '>';
} }
if (word_limit) {
question_text = question_text + '\n\nLimit this field to ' + word_limit + ' words.';
}
// Get the user input if any. // Get the user input if any.
if ($input_list.length !== 0) { if ($input_list.length !== 0) {
var input_list = []; var input_list = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment