Hi,
when I use a contact from and click send, I will get a small message for example “thanks you the message were send” …Is it possible the get the message in a pop up or something else ? Because later that are important infos, and a lot of people dont read it because its small and at the end of the form…
Any ideas ?
tom
You can style the css in the sub library of the class manager under Alerts, or even send it to another page if you wish.
Hi @Ive251068
Thanks a lot. I don´t see that menu before Is there a way to open a modal ? With the URL link ? Do you know that ?
tom
I did a contact form where a button opened up a modal with the contact form in it.
The confirmation message popped up and you manually had to close the window, which gives time for clients to notice a message.
Just a thought.
First, you have to understand how validation works in bootstrap. You can find more information about it on the bootstrap website.
For a good Javascript form validation with a lot of options, I suggest Parsley.
Here are some examples of bootstrap form validation to use on your website.
You can redirect a user after successfully submitted the form to a page or URL.
You can put a button on your website that opens a modal with your form in it.
But what you try to achieve is in my opinion not possible, if I’m wrong somebody will correct me.
Hopefully, you have enough information to help you in a good direction.
Ive
If you’re wanting to use the built in form, you could always set the success page to the same page as the form but with a parameter.
Eg. /contact.html?success=yes
And with a small bit of JavaScript, it could listen for the parameter to exist and then trigger a modal.
This will cause the page to reload, but its one way to do this.
Example javascript. (change the ID to match that of your modal).
<script>
window.onload = function() {
var url = new URL(window.location.href);
var success = url.searchParams.get("success");
if (success == "yes") {
$('#modal-test').modal();
}
}
</script>
for now I did like this:
but it doesn’t work properly. Frequently it opens success modal after page refresh.