This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 3
Activating code on HTML once form button clicked...?
Started 12 years ago by tmparisi | 3 posts |
-
Is there anyway to send information back and forth between MachForm and your HTML page? The reason I ask is this: So I have a form that once the user completes it they are asked to review it, and finally can click 'submit'. Pretty standard. However once submit is clicked I would like to activate a specific piece of javascript sitting on my HTML page. The script looks like:
' <script type="text/javascript">
jQuery(function($) {
$("#btnReservation").bind("click",function(){
$.Growl.show("You should receive an email confirmation shortly.", {
'title' : "Reservation Submitted!",
'icon' : "checkmark",
'timeout': "10000"
});
});
});
</script>'Its purpose is to sort of popup and display a message utilizing a jquery plugin. As you can see, it is currently known as "#btnReservation" as that is how I would call it from a normal HTML button, such as:
'<button id="btnReservation" type="button">Test Button</button> '
Any help would be very much appreciated!
Posted 12 years ago # -
You can create a custom confirmation page, instead of using the standard "Thank you for your message". You set that up in the Form Properties, there's a option for custom confirmation page, you can put your code in there, I expect.
If that's not what you want, I don't know how else you could do it without modifying the PHP code, to do this for a particular form. Also not sure if you can pass parameters to this page from the form (it would probably have to be a PHP page, not straight HTML if it has dynamic elements to it).
Posted 12 years ago # -
Hmmm, I guess I was hoping there was maybe a way to work this code into/through the machform_loader.js file? Some how pass the info into the javascript?
Posted 12 years ago #
Reply
You must log in to post.