-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would like to still show the form after submission #16
Comments
I tried to include the form again in the confirmation message
but it appears that insert tags are not processed here. |
Hallo, I had a look into the sourcecode of the page. Maybe it can be solved in the script on the frontend
Maybe I can even append another script which every 5 seconds replaces the conformation text with the original form ... What do you think? As a pity I have no experience with building Contao extensions, so I cannot prepare a PR. |
I could solve the issue by adapting the template ajaxforms.html5: var responsediv = form.querySelector('.ajaxformresponse');
if (responsediv) {
responsediv.innerHTML = "Ihre Eingaben werden versendet";
}
request('POST', form.action, formData, function () {
var location = this.getResponseHeader('X-Ajax-Location');
if (!location) {
form.innerHTML = form.innerHTML; // clear the form fields
var responsediv = form.querySelector('.ajaxformresponse');
if (responsediv) {
responsediv.innerHTML = this.responseText;
} else {
updateContent(form, this.responseText);
}
return;
}
request('GET', location, null, function () {
updateContent(form, this.responseText, location);
});
}); I have to add a field in the form with the class |
We are using this for feedbacks in an embedded video. If the form was submitted, it confirms the submission by showing the Text specified in the embedding element.
But how can I display the form in addition to the confirmation text such that the visitor can send another one.
The text was updated successfully, but these errors were encountered: