Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {{block class="MagentoContactBlockContactForm" name="contactForm" template="Magento_Contact::form.phtml"}}
- {{block class="Magento\Cms\Block\Block" block_id="myContact"}}
- $('.form.contact').on('submit',function(e){
- e.preventDefault();
- $.ajax({
- url:"<?php /* @escapeNotVerified */ echo $block->getFormAction(); ?>",
- data: $(this).serialize(),
- success: function(){ // it worked },
- error: function(){ // didn't work, why didn't he test his example before posting on SO?? }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement