Bad HTML contact form redirecting to script.googleusercontent.com after submission
up vote
0
down vote
favorite
The following contact form http://wearedappr.com/contact.html send all informations to a google spreadsheet after submitting. However, it also redirects the user to https://script.googleusercontent.com (See image below)

I am trying to have a confirmation message appearing instead of the redirection. Something like "Thanks for contacting us! We will get back to you soon!" which would appear on the contact form page once we submit it instead.
Can someone help by any chance?
Here is form-submission-handler.js:
http://wearedappr.com/form-submission-handler.js
html
add a comment |
up vote
0
down vote
favorite
The following contact form http://wearedappr.com/contact.html send all informations to a google spreadsheet after submitting. However, it also redirects the user to https://script.googleusercontent.com (See image below)

I am trying to have a confirmation message appearing instead of the redirection. Something like "Thanks for contacting us! We will get back to you soon!" which would appear on the contact form page once we submit it instead.
Can someone help by any chance?
Here is form-submission-handler.js:
http://wearedappr.com/form-submission-handler.js
html
Can you share your HTML code.
– Chuka Okoye
Nov 8 at 19:48
I suspect you are submitting the form directly to Google. The best way to achieve what you want is by using Ajax to submit the form them parse the json response and present you confirmation message if successful
– Chuka Okoye
Nov 8 at 19:49
here is the HTML code view-source:wearedappr.com/contact.html
– JohnDoe974
Nov 8 at 20:14
@ChukaOkoye, I have been trying to do what you described but without any success. Do you know where I could find an example of this by any chance? Thank you
– JohnDoe974
Nov 10 at 8:41
I will post an answer shortly. Give me a moment to get on my pc
– Chuka Okoye
Nov 10 at 11:37
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
The following contact form http://wearedappr.com/contact.html send all informations to a google spreadsheet after submitting. However, it also redirects the user to https://script.googleusercontent.com (See image below)

I am trying to have a confirmation message appearing instead of the redirection. Something like "Thanks for contacting us! We will get back to you soon!" which would appear on the contact form page once we submit it instead.
Can someone help by any chance?
Here is form-submission-handler.js:
http://wearedappr.com/form-submission-handler.js
html
The following contact form http://wearedappr.com/contact.html send all informations to a google spreadsheet after submitting. However, it also redirects the user to https://script.googleusercontent.com (See image below)

I am trying to have a confirmation message appearing instead of the redirection. Something like "Thanks for contacting us! We will get back to you soon!" which would appear on the contact form page once we submit it instead.
Can someone help by any chance?
Here is form-submission-handler.js:
http://wearedappr.com/form-submission-handler.js
html
html
asked Nov 8 at 16:43
JohnDoe974
1514
1514
Can you share your HTML code.
– Chuka Okoye
Nov 8 at 19:48
I suspect you are submitting the form directly to Google. The best way to achieve what you want is by using Ajax to submit the form them parse the json response and present you confirmation message if successful
– Chuka Okoye
Nov 8 at 19:49
here is the HTML code view-source:wearedappr.com/contact.html
– JohnDoe974
Nov 8 at 20:14
@ChukaOkoye, I have been trying to do what you described but without any success. Do you know where I could find an example of this by any chance? Thank you
– JohnDoe974
Nov 10 at 8:41
I will post an answer shortly. Give me a moment to get on my pc
– Chuka Okoye
Nov 10 at 11:37
add a comment |
Can you share your HTML code.
– Chuka Okoye
Nov 8 at 19:48
I suspect you are submitting the form directly to Google. The best way to achieve what you want is by using Ajax to submit the form them parse the json response and present you confirmation message if successful
– Chuka Okoye
Nov 8 at 19:49
here is the HTML code view-source:wearedappr.com/contact.html
– JohnDoe974
Nov 8 at 20:14
@ChukaOkoye, I have been trying to do what you described but without any success. Do you know where I could find an example of this by any chance? Thank you
– JohnDoe974
Nov 10 at 8:41
I will post an answer shortly. Give me a moment to get on my pc
– Chuka Okoye
Nov 10 at 11:37
Can you share your HTML code.
– Chuka Okoye
Nov 8 at 19:48
Can you share your HTML code.
– Chuka Okoye
Nov 8 at 19:48
I suspect you are submitting the form directly to Google. The best way to achieve what you want is by using Ajax to submit the form them parse the json response and present you confirmation message if successful
– Chuka Okoye
Nov 8 at 19:49
I suspect you are submitting the form directly to Google. The best way to achieve what you want is by using Ajax to submit the form them parse the json response and present you confirmation message if successful
– Chuka Okoye
Nov 8 at 19:49
here is the HTML code view-source:wearedappr.com/contact.html
– JohnDoe974
Nov 8 at 20:14
here is the HTML code view-source:wearedappr.com/contact.html
– JohnDoe974
Nov 8 at 20:14
@ChukaOkoye, I have been trying to do what you described but without any success. Do you know where I could find an example of this by any chance? Thank you
– JohnDoe974
Nov 10 at 8:41
@ChukaOkoye, I have been trying to do what you described but without any success. Do you know where I could find an example of this by any chance? Thank you
– JohnDoe974
Nov 10 at 8:41
I will post an answer shortly. Give me a moment to get on my pc
– Chuka Okoye
Nov 10 at 11:37
I will post an answer shortly. Give me a moment to get on my pc
– Chuka Okoye
Nov 10 at 11:37
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Try these.
1, Change your opening form tag to this:
<form class="gform pure-form pure-form-stacked" id="google_form_submit">
2, Add the following to your code before the closing body tag
<script type="text/javascript">
$('#google_form_submit').submit(function(e){
e.preventDefault();
var formData = $('#google_form_submit').serialize();
$.ajax({
type : 'POST',
url : 'https://script.google.com/macros/s/AKfycbzBvgWZZUgFbxCAlhPG4429wth61Rm7kymPaui3d5328UHHOiA/exec',
data : formData,
dataType : 'json',
encode : true
}).done(function(data) {
if(data.result == 'success') {
// Form submission was successful and accepted by google.
// You can show your success message here
} else {
// Form was submission failed for some reasons.
// You can examine the response from google to see whats missing
}
}).fail(function (jqXHR,status,err) {
// Form submission failed due to some network or other errors
// I am alerting the error but you can do anything else with it
alert(err);
});
});
</script>
Pardon my untidy codes... am posting the answer from a tablet.
If you see any thing wrong let me know so I can fix
Thank you @Chuka Okoye
– JohnDoe974
Nov 16 at 10:36
Glad I could help
– Chuka Okoye
Nov 17 at 11:45
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Try these.
1, Change your opening form tag to this:
<form class="gform pure-form pure-form-stacked" id="google_form_submit">
2, Add the following to your code before the closing body tag
<script type="text/javascript">
$('#google_form_submit').submit(function(e){
e.preventDefault();
var formData = $('#google_form_submit').serialize();
$.ajax({
type : 'POST',
url : 'https://script.google.com/macros/s/AKfycbzBvgWZZUgFbxCAlhPG4429wth61Rm7kymPaui3d5328UHHOiA/exec',
data : formData,
dataType : 'json',
encode : true
}).done(function(data) {
if(data.result == 'success') {
// Form submission was successful and accepted by google.
// You can show your success message here
} else {
// Form was submission failed for some reasons.
// You can examine the response from google to see whats missing
}
}).fail(function (jqXHR,status,err) {
// Form submission failed due to some network or other errors
// I am alerting the error but you can do anything else with it
alert(err);
});
});
</script>
Pardon my untidy codes... am posting the answer from a tablet.
If you see any thing wrong let me know so I can fix
Thank you @Chuka Okoye
– JohnDoe974
Nov 16 at 10:36
Glad I could help
– Chuka Okoye
Nov 17 at 11:45
add a comment |
up vote
0
down vote
accepted
Try these.
1, Change your opening form tag to this:
<form class="gform pure-form pure-form-stacked" id="google_form_submit">
2, Add the following to your code before the closing body tag
<script type="text/javascript">
$('#google_form_submit').submit(function(e){
e.preventDefault();
var formData = $('#google_form_submit').serialize();
$.ajax({
type : 'POST',
url : 'https://script.google.com/macros/s/AKfycbzBvgWZZUgFbxCAlhPG4429wth61Rm7kymPaui3d5328UHHOiA/exec',
data : formData,
dataType : 'json',
encode : true
}).done(function(data) {
if(data.result == 'success') {
// Form submission was successful and accepted by google.
// You can show your success message here
} else {
// Form was submission failed for some reasons.
// You can examine the response from google to see whats missing
}
}).fail(function (jqXHR,status,err) {
// Form submission failed due to some network or other errors
// I am alerting the error but you can do anything else with it
alert(err);
});
});
</script>
Pardon my untidy codes... am posting the answer from a tablet.
If you see any thing wrong let me know so I can fix
Thank you @Chuka Okoye
– JohnDoe974
Nov 16 at 10:36
Glad I could help
– Chuka Okoye
Nov 17 at 11:45
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Try these.
1, Change your opening form tag to this:
<form class="gform pure-form pure-form-stacked" id="google_form_submit">
2, Add the following to your code before the closing body tag
<script type="text/javascript">
$('#google_form_submit').submit(function(e){
e.preventDefault();
var formData = $('#google_form_submit').serialize();
$.ajax({
type : 'POST',
url : 'https://script.google.com/macros/s/AKfycbzBvgWZZUgFbxCAlhPG4429wth61Rm7kymPaui3d5328UHHOiA/exec',
data : formData,
dataType : 'json',
encode : true
}).done(function(data) {
if(data.result == 'success') {
// Form submission was successful and accepted by google.
// You can show your success message here
} else {
// Form was submission failed for some reasons.
// You can examine the response from google to see whats missing
}
}).fail(function (jqXHR,status,err) {
// Form submission failed due to some network or other errors
// I am alerting the error but you can do anything else with it
alert(err);
});
});
</script>
Pardon my untidy codes... am posting the answer from a tablet.
If you see any thing wrong let me know so I can fix
Try these.
1, Change your opening form tag to this:
<form class="gform pure-form pure-form-stacked" id="google_form_submit">
2, Add the following to your code before the closing body tag
<script type="text/javascript">
$('#google_form_submit').submit(function(e){
e.preventDefault();
var formData = $('#google_form_submit').serialize();
$.ajax({
type : 'POST',
url : 'https://script.google.com/macros/s/AKfycbzBvgWZZUgFbxCAlhPG4429wth61Rm7kymPaui3d5328UHHOiA/exec',
data : formData,
dataType : 'json',
encode : true
}).done(function(data) {
if(data.result == 'success') {
// Form submission was successful and accepted by google.
// You can show your success message here
} else {
// Form was submission failed for some reasons.
// You can examine the response from google to see whats missing
}
}).fail(function (jqXHR,status,err) {
// Form submission failed due to some network or other errors
// I am alerting the error but you can do anything else with it
alert(err);
});
});
</script>
Pardon my untidy codes... am posting the answer from a tablet.
If you see any thing wrong let me know so I can fix
answered Nov 10 at 12:06
Chuka Okoye
1223
1223
Thank you @Chuka Okoye
– JohnDoe974
Nov 16 at 10:36
Glad I could help
– Chuka Okoye
Nov 17 at 11:45
add a comment |
Thank you @Chuka Okoye
– JohnDoe974
Nov 16 at 10:36
Glad I could help
– Chuka Okoye
Nov 17 at 11:45
Thank you @Chuka Okoye
– JohnDoe974
Nov 16 at 10:36
Thank you @Chuka Okoye
– JohnDoe974
Nov 16 at 10:36
Glad I could help
– Chuka Okoye
Nov 17 at 11:45
Glad I could help
– Chuka Okoye
Nov 17 at 11:45
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53212327%2fbad-html-contact-form-redirecting-to-script-googleusercontent-com-after-submissi%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you share your HTML code.
– Chuka Okoye
Nov 8 at 19:48
I suspect you are submitting the form directly to Google. The best way to achieve what you want is by using Ajax to submit the form them parse the json response and present you confirmation message if successful
– Chuka Okoye
Nov 8 at 19:49
here is the HTML code view-source:wearedappr.com/contact.html
– JohnDoe974
Nov 8 at 20:14
@ChukaOkoye, I have been trying to do what you described but without any success. Do you know where I could find an example of this by any chance? Thank you
– JohnDoe974
Nov 10 at 8:41
I will post an answer shortly. Give me a moment to get on my pc
– Chuka Okoye
Nov 10 at 11:37