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
6 views

Add a non-system confirm popup on node add/edit

I want a custom confirmation popup to come up when someone wants to save a new node or update an existing one. Of course, the form only submits/saves info if the user clicks Yes. As it is now the ...
-4
votes
0answers
18 views

Form submit need help [on hold]

I am trying to submit node form using Drupal AJAX. I've added template file for node form and added my required fields.after submitting the form its not load the submitted form.after refreshing it is ...
0
votes
0answers
15 views

Programatically create filters [on hold]

How to create ajax filters Programatically in a custom view? For example, I want to display a table data with three select lists. By default all data will display. When I change the first select ...
0
votes
1answer
19 views

Why isn't the #ajax property available for more Form API elements?

Looking at https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7.x because I haven't seen a page updated for Drupal 8, it seems like only a select few form elements are allowed ...
0
votes
1answer
30 views

Cannot bind delegate onClick event on .use-ajax elements

I have a view, that is refreshed with ajax. I'm using Jquery 1.7.2 You click a button, that call a javascript function : $(view_identifier).trigger('RefreshView'); Before this refresh, I've ...
0
votes
1answer
21 views

What is the path for form elements which are ajax-enabled

I am working on the quiz module. I have to modify the form node/add/multichoice by hiding some of the form elements in it. With the help of krumo function of devel module, I am able to find the ...
-3
votes
0answers
23 views

How can i get to know that a file is in removing process? [on hold]

I want to disable form submit button when an uploaded file is in removing process. But the problem is that i could not get to know that a file is in removing process. I want to disable submit button ...
0
votes
0answers
26 views

Best way to trigger custom function in table row or in all rows [on hold]

I need some advice on the best way to achieve the following. I have a view that shows the following table: I want to have a submit button for each row that will trigger a custom function in a ...
0
votes
0answers
15 views

How do I create an autocomplete textfield? [duplicate]

I have a textfield, which should be autocompleted with the IDs of another entity ('context'). How can I do this? $form ['context_key'] = [ '#title' => t('Context key'), '#description' ...
0
votes
0answers
17 views

Webform add a submit user confirmation

i want to add a step between the validation of the form (check if there is errors in the form) and the submition of the form (the moment when the form is saved). I want to show to the user a colorbox ...
0
votes
0answers
8 views

Ajax 403 Error Access Forbidden when editing views or creating blocks

I'm getting 403 Errors, Access Forbidden on a Drupal 7 site when trying to edit views or add blocks. The error doesn't always occur, but once it start it doesn't go away either. The hosting company ...
0
votes
0answers
34 views

Ajax form callback not executed

I wrote a quite simple ajax callback to alter a views exposed form block. Ajax is fired but no commands are returned. Each time I change the value of my ajax field, I get two logs in dblog : ...
0
votes
2answers
30 views

Values disappear in $form_state['values']

I have some tableselect in a form which I can click a button and update from a database. When I update it, I need to be able to access those values in my submit function. But those values aren't ...
1
vote
1answer
16 views

Drupal 7 oEmbed Video Module loading via ajax for faster loading [closed]

Is there a module that lets you load in youtube videos via ajax? Currently I'm using oembed module ( https://www.drupal.org/project/oembed ) and it loads in the video js files which take up 1MB. I'm ...
0
votes
0answers
10 views

Push data to dataLayer on Webform Ajax submit

I'm using the Webform Ajax module to ajaxify my Webform and I need to push some data to the dataLayer to use with Google Tag Manager after a successful submit. Like: dataLayer.push({ 'event': ...
-3
votes
0answers
21 views

Js file in not getting called in ajax call [closed]

I want to include java script file into an Ajax callback in Drupal 8 strictly.But unable to do so, please help. I have tried adding js as follows: $form['#attached']['library'][] = ...
0
votes
2answers
45 views

How to get selected Value in the listbox by using form api

I have created a form with fields titled State and City. After selecting the state's appropriate city records, they will be loaded into city listbox. Until now they were working fine, but after ...
0
votes
1answer
23 views

How do I conditionally add a field?

I'm trying to find out any example of adding new conditional field using ajax in Drupal 8 form API, but I can't find it. This is my code. $form['name'] = array( '#type' => 'textfield', ...
0
votes
0answers
12 views

after ajax callback, how to alter views exposed form

Look at my code is there any other way to do this. I tried to change my form element type in my exposed view filter after selecting any dropdown menu and my dsm($form_state) not showing any [values] ...
0
votes
0answers
31 views

How to restrict submit handler when ajax button is clicked in altered form

I am altering ubercart "uc_product_add_to_cart_form" and adding an ajax button "calculate price": $form['price_calculation']['calculate'] = array( '#type' => 'button', '#value' => ...
0
votes
0answers
13 views

Input values of fields added NOT by ajax are not present in $state['values'] nor $state['input']

I have a form with the default set of fields on page load and with buton "add product". That button is appending the same set of fields into the form. Every set of fields has a button "calculate ...
0
votes
0answers
12 views

Drupal Ajax submit 3rd party forum form/post

Is it possible to Ajax submit external SMF forum forms from Drupal's side? Background: I am using Drupal And SMF Forums together. Both of these live on the same domain. My Drupal site loads all the ...
-1
votes
1answer
18 views

load() a template file

I am developing a custom module which allows to bookmark nodes/taxonomy pages in ajax. So far i can store in cookie via a custom module andsimple ajax code. I am now struggling in refreshing some div ...
0
votes
0answers
13 views

How do I add a specific product image from multiple variants to cart?

I have site working on Drupal 7 and Druppal commerce. In my node page (a.k.a product display) I have several images, which running with views slideshow and jcarousel. When user clicks on jcarousel ...
0
votes
1answer
18 views

#ajax callback uses the wrong callback

I don't know why, but using this code, when I click on the marker-category-add-submit button, it executes the type_callback callback, and not marker_category_add_callback. Why? If I comment all ...
0
votes
0answers
9 views

Use AJAX to post to remote endpoint from webform

I have installed Drupal 7.4x on my server and have added a webform, this form is a type of report, a weather report with description, date, time, location, etc. When this webform is saved, I want to ...
0
votes
0answers
22 views

Create new field in ajax treatment

i want to add dynamically some fields in my form. It works but i don't know why but my new rows are always created in the top of my page :/ This is an easy code example : function my_form() { ...
0
votes
1answer
44 views

Could not find resource node. but node enabled?

In my app, I am fetching data, editing and re-submitting it. That's where I am getting Could not find resource node.. However, node is enabled under Resources. Besides, I am not getting any errors ...
0
votes
0answers
5 views

added date filter to one of the views shows ajax error:length undefined

I have added a date module to my site and used date filter in views i.e. to search news content through date. This filter works fine in preview section, but in main page it shows Ajax error as length ...
0
votes
1answer
18 views

How to execute some js code after click on expose filter AJAX enabled submit?

I have try to update the input value of a expose filter field before submit of the expose filter through Js. What i have tried $('#edit-submit-phrases').on('click', function() { alert('check'); ...
0
votes
0answers
21 views

Display current node rank from votes in view

Problem : Unknow how to show the rank of a node in view (by custom php) I show a leaflet map with makers and when we click on a marker it show a tooltip wich contains all the fields wich aren't ...
0
votes
1answer
32 views

Show and hide form element based on values of other form elements

$form['bookpage'] should be hidden at first. Then should be shown based on user selected value in $form['student']. But somehow, before user selects anything, upon loading the option list, it ...
0
votes
0answers
20 views

how to fetch value from grouped form fields after ajax is fired under conditional select type

I also used dpm($form_state->getValue('input_select','text')); and dpm($form_state->getValue('input_select','body'));its after the ajax handler is called... what is the right way to fetch value ...
1
vote
4answers
62 views

How to change the button name after click on it using ajax

I am a newbie in drupal. I created a form that perform ajax action. How can I change the button name after click by using ajax. function auktion_fav_form($form, &$form_state, $auktion_id) { ...
0
votes
1answer
26 views

Update commerce cart block when product added through ajax

Hii How can I update commerce_cart_block when my product is added through ajax. Any suggestion will be helpfull.
0
votes
0answers
10 views

An AJAX HTTP request terminated abnormally with Commerce Kickstart

With CK 7.x-2.35 and 7.x-2.36 users starting to see the following error message on checkout. An AJAX HTTP request terminated abnormally. Debugging information follows. Path: /system/ajax StatusText: ...
1
vote
0answers
25 views

Forms API custom element

I'm currently converting some of our custom forms API elements into Drupal 8 equivalents, however I'm running into a couple of issues. Firstly I don't seem to receive a 'triggering_element' back in ...
0
votes
0answers
14 views

simplenews ajax submit

I work on D7, Use Simplenews Modules and display in block of newsletters form subscription. Enter Email Id and press Enter display messages where print $messages; in page.tpl.php and reload page. I ...
0
votes
1answer
23 views

Reload Ajax from the js code

I am having trouble reloading a page through Ajax from custom JS. There is a form which will change with your choices and this changes are made by Ajax. How I can change the select list "Leistung" ...
1
vote
1answer
57 views

ajax_example_add_more - Drupal 8

ajax_example_add_more($form, &$form_state, $no_js_use = FALSE) I want to show a button "add more" that adds another textfield, and the corresponding "remove" button. I followed ...
0
votes
0answers
7 views

How can I validate a fieldset or individual fields with ajax?

On my user registration form I have multiple fieldsets, and I want to validate each fieldset individually before moving to the next one. Kind of like a multipage setup, but all on one page. Is there ...
1
vote
0answers
24 views

How to use form ajax so a click on checkbox “A” posts the content of textfield “B”?

I'm trying to get the value of textfield "B" when checkbox "A" is toggled. Both fields are wrapped in a fieldset who's content is replaced by the callback output. So far I can get both fields to ...
0
votes
1answer
7 views

Is there an Authcache load event for fragments?

I would like to create a callback javascript function to fire when one of my Authcache fragments is loaded via AJAX. Is there a way to hook into this event? Thanks.
1
vote
1answer
15 views

Drupal 7 Simple Ajax Module returning 404

I am trying to do a simple Ajax call in drupal 7. But i get a 404 not found. I tried with another drupal install and it worked. Here is the list of the installed modules : CKEDITOR, ctools, entity, ...
0
votes
0answers
22 views

ajax(jsonp) validation return boolean for using in jquery validation plugin within Drupal

I'm trying to do a jsonp call to backend and validate a unique number. I want the success callback to return true/false since the jQuery validate plugin expects a boolean value to display error ...
0
votes
0answers
76 views

Owl Carousel 2 switches to default position after Ajax call

I'm a real noob at js so I hope I'll find working solution to solve my problem. I'm working on Drupal 7 project based on Porto template v.2.1 using Dupal Commerce module. I've implemented Owl Carousel ...
1
vote
1answer
15 views

How can I programatically add the default AJAX throbber to a form submit?

I'm trying to add the AJAX throbber in core to a form submit button, specifically the Private Message module new message page. Here is my code: function ...
0
votes
0answers
15 views

Drupal form ajax and select stylization?

I'm trying to make ajax select, but I'm using selectBox for form and I'm not doing click on form element. How can I done this? $form['choice_wrapper']['format'] = array( '#type' => 'select', ...
0
votes
1answer
27 views

Invalid datetime format for a field never submitted?

I'm working my the edit page for my mobile app which is fetching data from a Drupal site. I'm fetching data, I'm editing it, and submitting it. However, when submitting back, I'm getting Internal ...
-1
votes
0answers
22 views

Drupal Ajax event not work

just why this not work ? I've done something more complex but suddenly everything won't work... It's a simple button with his text update when we click on it <?php /** * @file * Food Truck ...