Ajax is a group of interrelated web development techniques used on the client-side to create asynchronous web applications.

learn more… | top users | synonyms

0
votes
0answers
9 views

AJAX error when using a custom ViewsFilter?

I have created a custom field that is a collection of a couple things, one being a taxonomy entity reference. Now I want to be able to filter a view based on this taxonomy reference. With the code ...
0
votes
0answers
18 views

How to create an ajax auto-refresh table?

My current situation: I have an entity list builder for my own custom entity type. I need to make this rendered table to refresh himself (the whole table) each X seconds (5 maybe). How could I ...
1
vote
1answer
48 views

Delete button not working on forum comment

I am using the AJAX Comments module. For forum I am using the Advance Forum module. In forum topic I have some post replies, my issue is when I am click on delete button on forum comment a popup is ...
2
votes
1answer
21 views

Recaptcha not working in user register form

I am using google recaptcha in drupal 7 for user registration. The captcha works fine in the normal user register page but doesn't appear in the pop up dialog box for user registration? some more ...
0
votes
0answers
21 views

Multiple addressfield in multistep webform is not working properly

I have created a multi-step webform using pagebreak functionality. In this form, I am using multiple address field. When I go to form first time, all address fields work properly and I can move on ...
0
votes
1answer
20 views

Ajax request return field without name attribute

Instead of getting multiselect on making ajax request while I select content type, I got single select and this select hasn't any name, so here's problem and I don't know how to fix it. can anybody ...
0
votes
0answers
30 views

How do I display only nested form elements in modal

i'm currently working on a custom field/widget. For a better ux i want to display some nested elements in a modal dialog. The elements are generated during form submission (multistep widget) i added ...
1
vote
1answer
23 views

problem in passing Data ajaxly

I want to do some tasks with ajax in drupal, in client side I passed data with jQuery.ajax({ url: '/rest/session/token', method: 'GET', ...
0
votes
0answers
12 views

How can i prevent form submission when a file is being removed or uploaded?

I have a node form for my custom content type. There is file field in that content type. And i want to prevent form submission when a file is being removed and uploaded. Note: File removed and ...
0
votes
1answer
37 views

Ajax form submit - how to recognize if form contains errors in ajax callback?

I have a simple form with ajax submit: function activit_registration_form($form, $state) { $form["ajax-start"] = array("#markup" => "<div id='registration-form-ajax'>"); // ... some ...
0
votes
1answer
17 views

Adding functionality to a form button that would load user details / corresponding field data for “autofill”

I have a form that has a address field holding inputs for: name address phone etc. I've added a button on this form/field: Load my data which I would like to load user details/data. On click it ...
0
votes
0answers
10 views

Not possible to override js/misc/ajax.js using hook_js_alter in Bootstrap theme

I am trying to specify another custom ajax.js file in place of js/misc/ajax.js using hook_js_alter(&$variables) but with no success. Upon inspection of the &$variables array, my target file js/...
0
votes
1answer
24 views

Webform block: reload page with anchor link

I have a webform shown in a block that appears at the bottom of my page. If I select 'no redirect (reload current page)' when the form is submitted you are taken back to the top of the page and the ...
2
votes
1answer
23 views

Track What Causes Ajax Http Error 200 in Drupal Form API

I always encountered Ajax Http Error 200 with out knowing the reason that causes it. This error is so mind boggling, since I do not know where it came from. For example, in my recent code, it ...
1
vote
0answers
30 views

Ajax add more implementation of several buttons - undefined index problem

I want to set a custom form with multiple "add more" buttons in Drupal 7. For now I'm trying with 2, but it doesn't work, I get: "Notice: Undefined index: main_film_tab in ...
0
votes
1answer
31 views

How to bind to AJAX complete event in regard to styling the AJAX button submit throbber

With this I can bind to the AJAX button submit event: Drupal.ajax.prototype.beforeSend = function (xmlhttprequest, options) { ... } My question, how to bind to the opposite (i.e. when AJAX button ...
1
vote
1answer
12 views

all my edit button cannot work and got “Invalid form POST data” AJAX error

I don't know why all my edit button doesn't work since yesterday. In the log report, I got an AJAX HTTP error with 200 HTTP Code and "Invalid form POST data." message. And when I clicked any "edit" ...
0
votes
0answers
38 views

What do these HTTP error codes mean? [on hold]

I ran migrate in Drupal 8, but it stops at 20% the first time, showing: An AJAX HTTP error occurred. HTTP Result Code: 500 The second time, the migration error is the following: An AJAX ...
1
vote
0answers
40 views

QuickTabs with ajax and information from url

I am using Drupal 7 and QuickTabs to display some tabs. There is no problem without ajax. But I want to use ajax to have a clean url. In one tab I am displaying a block which uses the current nid. ...
0
votes
0answers
46 views

Bad error handling of .pdf files against all other file types when a file exceeds the maximum file size

I have a file field with the following allowed file extensions: txt, pdf, doc, docx, zip The Maximum upload size is set via my php.ini and it is upload_max_filesize = 2M 1. While I'm trying to ...
0
votes
1answer
35 views

How do I find out which module handle a GET/POST/PUT?

I'm reading a Drupal 7 project. However, unfortunately I can't find out which module handle an Ajax request. I only know the destination address which has been rewritten. (Suppose it's http://example....
1
vote
0answers
31 views

How to make a views with exposed filters, working with AJAX? (The pager is not working)

I have setup a views page with ajax behavior. It works well when there is no exposed filter, as you can see there: http://www.obersonabels.krown.ch/fr/publications_test username: demo password: ...
1
vote
1answer
33 views

Ajax forms in pages

I am trying to code Drupal Ajax forms in Drupal pages (Drupal Content type: Basic page). However, it seems like the callback does not work, because when I remove the callback function nothing changes, ...
2
votes
1answer
28 views

How to use AJAX for an exposed filter form of a Views block?

I have a View, in a block, assigned to a region. I have enabled Ajax for the view. Pagination works with Ajax. Exposed filters do not. Exposed filters "submit". I am definitely willing to cut ...
1
vote
2answers
56 views

Fill form on ajax callback

Seems to be an extremely simple question. But I can't figure it out. In my module's form I need to load form values depend on the value of certain one and rebuild the form using those. here is the ...
1
vote
2answers
31 views

Add form field with AJAX

Here is the form: function payment_form($form, &$form_state) { $form['#tree'] = TRUE; // since credit card is also an option, the gift card section is contained in this div. $form['payment'...
1
vote
0answers
17 views

single exposed filter for two displays in same view

I have three displays in same view. Every display has exposed form filter and in every pages ajax was set yes. How to use a single exposed filter for these three displays in same view? I placed these ...
1
vote
2answers
50 views

Form ajax add more button added via another ajax callback not working

I have a form button which I want to add another field with another button on that form( I am able to do this) but second button is not clickable. Any idea. Following is my code- This is my form code-...
3
votes
1answer
57 views

Modal form instead of redirect

I have a site-wide contact form setup that redirects the user to the homepage and posts the submission result to the help section. It works as intended, but I was wondering what I would need to do to ...
1
vote
2answers
38 views

Get content of selected option after user select any option from select field

I have created a content type, This content type form having a select box. I need to develop a functionality like once the user select any option from select field the following textbox should having ...
0
votes
0answers
26 views

The module “JS” does not work with a determined bootstrap level ('bootstrap' => …) [duplicate]

https://www.drupal.org/project/js It only works without setting a bootsrap level or with 'bootstrap' => DRUPAL_BOOTSTRAP_FULL. When I set 'bootstrap' => DRUPAL_BOOTSTRAP_SESSION (for example) it ...
0
votes
1answer
39 views

After any AJAX form event, all Entity Reference Fields are blank

After any AJAX event in the form (Upload image, add a new field collection row etc.) All Entity Reference fields go blank. I have multiple entity reference fields, all using a view to get list ...
0
votes
0answers
22 views

Is it possible to invoke API functions inside a JS callback?

I used js module. I wonder about calling the following functions in a callback: node_load() entity_load() user_load() I encountered a website error using such functions. Something became wrong in ...
0
votes
0answers
11 views

Panels Ajax Tabs - Why won't ajax work after first click? + Patch Application

Using Panels Ajax Tabs to display four views through Panels. Originally, I was using Panels Tabs to display the content, but ran into compatibility issues with jQuery (known bug of Panels Tabs, but ...
0
votes
1answer
14 views

How to pass along current $form_state for an #upload_validators callback?

I have a managed_file #upload_validators callback and when it is called the $form_state does not get passed along with it. My goal is to use another field in the form to rename the uploaded file. I ...
1
vote
0answers
51 views

Use a custom JS modal to confirm changes made on node add/edit form before submit

I basically want to do what confirm_form does, but in a custom modal (I am gonna use a JS plugin to generate the confirm modal). So what I have is a large hook_form_alter, and I am using the ...
3
votes
2answers
111 views

Ajaxly login/signup in bootstrap modal

This is sample modal sample of boostrap modal <div id="signin" class="modal fade" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="...
0
votes
0answers
21 views

Add new submit handler to Ubercart ajax “add to cart” form

I am using Ubercart ajax driven "adding products to cart" functionality and I'd like to add my own submit handler to the event of adding product to cart. I have tried: function activit_form_alter(&...
1
vote
0answers
19 views

RefreshView, can't select html refreshed elements

I have a view page. This page has 3 blocks. Block 1 refresh Block 2. Block 2 refresh Block 3. My code is as follow : (function($) { Drupal.behaviors.mymodule = { attach: function(context, ...
1
vote
1answer
17 views

How to prevent closing CTools modal window with ESC during AJAX?

How can I prevent closing CTools modal window with ESC key during AJAX request?
0
votes
0answers
8 views

How to save Webform's component fields using field specific AJAX buttons?

How to add a save or save draft button under each Webform's component field to save the edited value for that particular field? Any idea how to do that?
0
votes
0answers
26 views

how do i set original value after $form_state->setRebuild(TRUE);

i have form, with dynamic fields that can be added and removed from button using ajax submit/callbacks. the problem that i encounter is: every-time i add new field, the 'add button' will submit with ...
2
votes
1answer
28 views

I don't want ajax submit / callback validate form '#required' => TRUE,

I have form with static fields and dynamic fields as follow: fieldset textfield00 (require = true) textfield01 (require = true) fieldset textfield02 fieldset add textfield submit button ...
1
vote
1answer
60 views

How do I pass JavaScript variables back to PHP?

I'm trying to build a Drupal 8 module with a jQuery plugin. I wanted to pass some of the JavaScript variables to PHP so that I can save the variables into database. This question asked about the way ...
0
votes
1answer
29 views

Form selection with radios, ajax and taxonomy terms

In my form i get the message: "An illegal choice has been detected. Please contact the site administrator." after i didn't select a radio box in the 2nd form. How can i avoid this? NULL doesn´t work ...
1
vote
1answer
43 views

How to theme form?

I created a form in custom module, Something like: $form['form00'] = array( '#type' => 'textfield', '#title' => 'dummy', ); $form['form01'] = array( '#type' => '...
0
votes
0answers
22 views

“A fatal error occurred: Serialization of 'Closure' is not allowed”

I'm implementing a form using the Drupal form and AJAX. I've done this many times before, but now I stumble upon a problem I never seen before. My AJAX event is called when the value of a textfield ...
0
votes
0answers
34 views

Add form field dynamically but ajax submit and callback is not triggering

I try to create a for that can add and remove field dynamically through ajax. like this: use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Ajax\AjaxResponse; ...
1
vote
1answer
38 views

Chunked Ajax Responses

Does Drupal support chunked AJAX responses in either direction? I have not been able to find materials on this so far and am curious: Is Drupal AJAX capable of working with chunked AJAX responses (...
0
votes
1answer
18 views

Unable to delete a file with services

I am making an AJAX call to /file/.json. Webserver log says DELETE /services/file/5710.json HTTP/1.1 200, console log says the file has been deleted; yet the file is still there when you go here. What ...