Sometimes we need to build a site that processes the requests by AJAX in order to give a better experience to the users and remove the flash when the page is redirecting.
Fortunately Drupal has useful modules to do this easily so I’m going to show how we can set up our site to work by AJAX.
To do this you can use a contrib module that helps us to load all of content that you want in a DIV, it's call ajax links api, see the more information about it: https://www.drupal.org/project/ajax_links_api
So you can download it and install it using Drush:
drush dl ajax_links_api drush en ajax_links_api
However this module won't work for the forms, so we have to do the following.
Asaf is the module that we can use for this, it’s easy to configure and to use as well, it allow you submit any for form by AJAX even it works with Drupal forms or you can build your own forms.
See the more information about it: https://www.drupal.org/project/asaf
If you don’t have it yet:
drush dl asaf drush en asaf
Copyright © 2015 - 2017 - ParallelDevs
Recent comments