Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. {{block class="MagentoContactBlockContactForm" name="contactForm" template="Magento_Contact::form.phtml"}}
  2.  
  3. {{block class="Magento\Cms\Block\Block" block_id="myContact"}}
  4.  
  5. $('.form.contact').on('submit',function(e){
  6. e.preventDefault();
  7.  
  8. $.ajax({
  9. url:"<?php /* @escapeNotVerified */ echo $block->getFormAction(); ?>",
  10. data: $(this).serialize(),
  11. success: function(){ // it worked },
  12. error: function(){ // didn't work, why didn't he test his example before posting on SO?? }
  13. });
  14.  
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement