skip to Main Content

Check if email exists in WordPress through Ajax on HTML form submision

In my WordPress v5.8.2, I have localized the ajax_url in the functions.php: wp_enqueue_script('site_scripts', get_stylesheet_directory_uri() . '/assets/js/site-scripts.js', array('jquery'), null, true); wp_localize_script('site_scripts', 'site_ajax', array('ajax_url' => admin_url('admin-ajax.php'), 'check_nonce' => wp_create_nonce('site_ajax_nonce'))); With the below jQuery script I am processing the form to check if…

VIEW QUESTION

Request gets overridden with other data – Jquery ajax

I'm trying to get data for autocomplete using laravel. Controller: public function collection_search(Request $request) { $term = $request->search; $serveurapObj = new Serveurap(); $result = $serveurapObj->collectionAutocomplete(); return response()->json($result); } Model: public function collectionAutocomplete($term) { $where= ['m.supprime'=>'0', 's.supprime'=>'0']; return DB::table('serveuraps AS s')…

VIEW QUESTION
Back To Top
Search