Skip to main content
  • X Twitter
  • youtube
Home
Drupal 4U
Built for AI. Powered by Drupal.
  • Home
  • Showcases
  • Services
  • Blog
  • Themes
  • About
  • Contact

Breadcrumb

  1. Home
  2. Tips and Tricks
  3. Drupal Rooms Availablity Search Block - Ajax breaks "Book this Room" link

Drupal Rooms Availablity Search Block - Ajax breaks "Book this Room" link

Tips and Tricks
February 11, 2016
Profile picture for user drupal
By drupal
  • facebook-f
  • twitter
  • envelope
  • print
5

Ajax overrides form action="/node-url" with action="/views/ajax"

Workaround with Drupal's hook_form_alter() for views module. See similar problem with solution here: https://www.drupal.org/node/1294164#27

The hook_form_alter() basics can be found here: http://websmiths.co/blog/very-introduction-drupals-hookformalter

function views_form_alter(&$form, &$form_state, $form_id)  {
if($form_id == "rooms_views_booking_button_form") {
    $form['#action'] = url($_GET['q'], array('absolute' => false));
}
}
PHP

Read more articles

Newer
Google Maps v3 api stop working
Older
How to find the best Drupal themes on Envato Market / ThemeForest
  • Log in to post comments
Profile picture for user drupal
drupal
5
1
min read
A- A+
  • facebook-f
  • twitter
  • envelope
  • print

Contact Us

Get in touch for questions and our Drupal development, design and optimization services.

Contact Us

We aim to reply the latest within 48h.

Drupal 4U: Built for AI. Powered by Drupal.

We are a group of Drupal designers, developers and webmasters. We are Drupal experts! We provide comprehensive services that go beyond traditional web development, focusing on how AI understands, interprets, and cites your content. With our deep expertise in Drupal's architecture, we build the intelligent core of your digital presence, ensuring your brand remains authoritative and visible in a world where AI is the primary gatekeeper of information. Partner with us and let's future-proof your digital strategy together.

  • X Twitter
  • youtube

Drupal Services

  • Drupal Web Design
  • Drupal Development
  • Drupal SEO
  • Drupal GEO
  • Drupal Migration

Drupal 4U

  • Services
  • Showcases
  • Themes
  • Blog
  • About

Drupal Links

  • Official Drupal Website
  • Theme Forest
  • Gaivas Themes
  • More Than Themes
  • DXPR: Drupal for Marketers
  • Drupal Answers
2012 - 2025, Drupal 4U

Footer menu

  • Contact
Home
Drupal 4U
Built for AI. Powered by Drupal.
  • Home
  • Showcases
  • Services
  • Blog
  • Themes
  • About
  • Contact
Clear keys input element