Questions tagged [drupal-ajax]

Drupal AJAX refers to the AJAX implementation used from Drupal.

In Drupal 6, the support for AJAX was limited to the #ahah form API property. Drupal 7 has an extended support for AJAX that starts from the #ajax form API property, and continues with a group of functions that are part of the Drupal 7 Ajax framework.

42 questions
1
vote
0 answers

AJAX is not triggered when TIME of date_popup element is changed

I have a date_popup form element with date and time parts: $form['date_time'] = array( '#type' => 'date_popup', '#title' => 'Date and time', '#date_format' => 'd/m/Y H:i', '#ajax' => array( 'wrapper' => 'date_time_ajax', …
Alexis
  • 83
  • 2
  • 11
1
vote
1 answer

check a condition before a ajax call back of form in drupal 7

I have written ajax callback on a textfield and it is called on blur event. But before It going for ajax callback I want to check a condition that textfield not empty. So I want,If textfield is not empty then the ajax callback is get called…
Swapnil Patil
  • 971
  • 2
  • 18
  • 41
1
vote
2 answers

Load a page with drupal ajax from javascript

I am working on a Drupal module that provides a jvectormap node type. Everything works fine except the drupal .load(). I use jQuery("#content").load(Drupal.settings.jvectormapnode.url+'/'+ code +'?ajax=1'); The following happens i click a country…
Pieter Maes
  • 1,204
  • 1
  • 8
  • 9
1
vote
0 answers

Update commerce cart form view on ajax submit

I have altered the views_form_commerce_cart_form_default form to allow ajax submission on quantity change. My ajax attribute is as follows: $ajax_field_settings = array( 'event' => 'blur', 'callback' => '_ajax_cart_update_cart', 'method' =>…
oleron
  • 483
  • 2
  • 7
1
vote
1 answer

Drupal 7 FAPI - ajax image preview

I am trying to preview the uploaded image using ajax in my D7 module but don't know why it's not working. Here is what I am trying to do:- function create_ad_form($form, &$form_state) { $form['image_file'] = array( '#title' => t('Upload…
Muhammad Qasim
  • 351
  • 1
  • 6
  • 21
0
votes
2 answers

Why should I use Drupal's Form API & Ajax framework for this rather than just implementing my own solution with calling node_save()?

I want users to be able to submit nodes and comments via AJAX. I also want to do some fairly extensive customization of the node and comment forms. I've spent time looking through documentation and code examples for Drupal 7's Form API and Ajax…
maxedison
  • 17,243
  • 14
  • 67
  • 114
0
votes
2 answers

Drupal Commerce Ajax cart with added fields

Sorry for the really bad title but wasn't sure how to describe my problem in 10 words. I have drupal commerce and have made a view that displays the cart contents on top of the checkout page. Quantity is a text field so it is editable and I have an…
masimplo
  • 3,674
  • 2
  • 30
  • 47
0
votes
1 answer

Counting the number of threads posted in a Drupal Forum Using Drupal API

I am New to Drupal Apis and i am now looking to build a few analytics board for our Drupal Forums. I am looking to fetch the following data, so that i can use it generate weekly reports. Total no of threads in a specific forum. Total number of…
Eswar Rajesh Pinapala
  • 4,841
  • 4
  • 32
  • 40
0
votes
1 answer

ajax is not working in drupal 7 while using edit section

I'm also using drupal-7 and create a module. A form in which there are 2 drop downs. On selection of car model (1st drop down) car variant (2nd drop down) value will change. It work perfectly when I am creating new one. But once I go to edit some…
manish nautiyal
  • 2,556
  • 3
  • 27
  • 34
0
votes
1 answer

Drupal: How to bind a custom jQuery function to a certain AJAX response?

I have an AJAX form which is validated by AJAX callback function. Everything is done using Drupal API. But I don't want to use standard mechanism of appending/prepending/replacing of DOM elements when callback happens. How to catch that AJAX…
Maxim
  • 191
  • 2
  • 12
0
votes
1 answer

Is it possible to ajaxify drupal multistep forms?

It seems to be difficult to ajaxify a drupal multistep form(loading next step without page refresh).I googled it but I didn't find any solution. Does anybody know how to do it?
Nick.h
  • 4,035
  • 5
  • 21
  • 22
0
votes
1 answer

How to create an image button that behaves like a button in drupal 7?

How I want it to work: I have list of buttons(type button) that trigger an Ajax call that add the that item to a list. This works as exactly as I want it except for the button looks ugly . The problem: When I try to replace the "button" with an…
mr_87
  • 13
  • 3
0
votes
1 answer

drupal 7 ajax framework example does not work

I want to add one form in user profile page. So i created user-profiled.tpl.php. In that template,i just copied the example from ajax framework for testing. Here is the whole codes: function ajax_example_simplest($form, &$form_state) { $form…
user3752276
  • 221
  • 1
  • 5
  • 12
0
votes
1 answer

Drupal AngularJS ajax simple ng-repeat update

i have problem replacing my ng-repeat my html inside ng-app
  • {{ error.text }}
controller…
Victor
  • 617
  • 5
  • 5
0
votes
3 answers

Div Refresh without page load using ajax drupal

I want to load the data from db and want to display the counts example: message(5).So i have written the query inside the the div. "; db_select("query is here"); echo…
Anaz
  • 1
  • 4