Unyson
Unyson copied to clipboard
Problem with AJAX Contact Form in SubDomain
Hi) I have a contact form with Ajax submit. When I click send button Error message appeared (Ajax error (more details in console)) My site is located on subdomain.
I have found in this file wp-content\plugins\unyson\framework\static\js\fw-form-helpers.js this line ajaxUrl: (typeof ajaxurl == 'undefined') ? '/wp-admin/admin-ajax.php' : ajaxurl, and have added here '/wp-admin/admin-ajax.php' my subdomain. Then the form has worked.
Could you please fix this problem and add to new update? Thank you very much.
I made a small change. And added in docs
wp_localize_script('fw-form-helpers', 'fwAjaxUrl', admin_url( 'admin-ajax.php', 'relative' ));
This is all I can do for this issue.