diff --git a/app/request/forms.py b/app/request/forms.py index e02af2a34..7ad877871 100644 --- a/app/request/forms.py +++ b/app/request/forms.py @@ -149,7 +149,7 @@ class AnonymousRequestForm(Form): # Request Information request_category = SelectField('Category (optional)', choices=CATEGORIES) request_agency = SelectField('Agency (required)', choices=None) - request_title = TextAreaField('Request Title (required)') + request_title = StringField('Request Title (required)') request_description = TextAreaField('Request Description (required)') # Personal Information diff --git a/app/static/js/request/new-request-agency.js b/app/static/js/request/new-request-agency.js index a97bc5b32..eaaa66c39 100755 --- a/app/static/js/request/new-request-agency.js +++ b/app/static/js/request/new-request-agency.js @@ -208,7 +208,11 @@ $(document).ready(function () { }); // Disable submit button on form submission - $('#request-form').submit(function() { + $('#request-form').submit(function () { + // Prevent multiple submissions + $(this).submit(function () { + return false; + }); $('#submit').hide(); $('#processing-submission').show() }); diff --git a/app/static/js/request/new-request-anon.js b/app/static/js/request/new-request-anon.js index 63769d7c6..376efbebe 100755 --- a/app/static/js/request/new-request-anon.js +++ b/app/static/js/request/new-request-anon.js @@ -221,7 +221,11 @@ $(document).ready(function () { }); // Disable submit button on form submission - $('#request-form').submit(function() { + $('#request-form').submit(function () { + // Prevent multiple submissions + $(this).submit(function () { + return false; + }); $('#submit').hide(); $('#processing-submission').show() }); diff --git a/app/static/js/request/new-request-user.js b/app/static/js/request/new-request-user.js index a37b4676b..e4059d57d 100755 --- a/app/static/js/request/new-request-user.js +++ b/app/static/js/request/new-request-user.js @@ -114,7 +114,11 @@ $(document).ready(function () { }); // Disable submit button on form submission - $('#request-form').submit(function() { + $('#request-form').submit(function () { + // Prevent multiple submissions + $(this).submit(function () { + return false; + }); $('#submit').hide(); $('#processing-submission').show() });