Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

Problem with AJAX Contact Form in SubDomain

Open RodalErmakov opened this issue 11 years ago • 1 comments

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.

RodalErmakov avatar Sep 16 '15 11:09 RodalErmakov

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.

ghost avatar Sep 17 '15 15:09 ghost