Hi,
What version of the plugin are you using? The Professional version of the plugin includes the submission feature, and manages the collected data by the form. It can send notification emails, and store the data in the plugin’s database.
However, if you want submit the form to your own script and manage the form by yourself, you can use jQuery to assign the “action” attribute to the form (with the absolute URL to your script), and then call the “submit” method of the form object.
If you need additional help with the code, I can offer you a custom coding service through my private support page:
http://cff.dwbooster.com/contact-us
Best regards.
Hi,
I use the free version. I think it’s enough for our issues.
How can I implement a jQuery script correctly?
I have the following little script which I added to a html content field:
<script>
$(document).ready(function(){
$(‘#button’).click(function() {
var val1 = $(‘#tfieldname1).val();
var val2 = $(‘#fieldname2’).val();
$.ajax({
type: ‘POST’,
url: ‘ThePHPfile.php’,
data: { fieldname1: val1, fieldname2: val2 };
});
});
});
</script>
The script doesn’t work. If I paste this code to the formular the form is not loading correct. And – What do I have to define to the button?
Hi,
Your code has multiple javascript errors, I will try to give you some tips, but if you need additional help, you should hire a custom coding service (http://cff.dwbooster.com/customization)
First, don’t use the the $ symbol, use the object: jQuery.
Second, if you have inserted only one form in the page, and you want get the values of fields using their IDs as selector, the correct selectors are: fieldname#_#, where the # at the end of selector represents a consecutive integer based in the amount of forms in the page, for example:
var val1 = jQuery('#tfieldname1_1).val();
var val2 = jQuery('#fieldname2_1').val();
Third, there is not a #button field, the buttons have assigned a fieldname# too, so, you should refer to this field as fieldname#_#, similar to the other fields in the form.
Fourth, you should use an absolute url to the php script: http://…..
Fifth, use the onload event of the window object, instead the document ready event:
jQuery(document).on('load', function(){});
Best regards.
Thank you very much. I will check if I get it to run. If not I will contact your custom config service.
Best Regards,
Tobi