Peeking inside Drupal 7: Available PHP and Drupal functions

I've always wondered what Internal PHP and user defined functions are available when developing modules in Drupal. Obviously it depends on the environment and what Drupal contrib/custom modules you have installed and enabled, but below is a list using a Vagrant Drupal Development (VDD) setup and a vanilla Drupal 7 install with a handful of core modules enabled.

Drupal form AJAX submit button with bootstrap dialogue confirm box

Adding AJAX to a submit button in Drupal is great to submit a form without the page reloading. However, there is no way to ask the user to confirm the submit and also give them the option to cancel the action. What I want to do is show the user a bootstrap modal as a confirmation box so that the user can choose to continue to submit the form or to cancel - I want to do this using Drupal best practices.

Demo:

Drupal Bootstrap: Video Gallery for YouTube and Vimeo using a Custom Field Formatter and Video Embed Field module

I'm using the Video Embed Field Module and would like display this field as a gallery using the Bootstrap gallery at https://github.com/blueimp/Gallery, a touch-enabled, responsive and customizable image and video gallery.

Drupal Bootstrap: Image Gallery using Custom Field Formatter

I have an image field, using the the core image module, set to unlimited number of values. I want to create a custom field formatter so that these images are shown as thumbnails that when clicked pops up the Bootstrap image gallery. This gallery will be an extension to blueimp Gallery, a touch-enabled, responsive and customizable image and video gallery seen here: https://blueimp.github.io/Bootstrap-Image-Gallery/

Client-side validation in custom forms using Drupal, Bootstrap 3, and Boostrap Validator plugin

I need to add form client-side validation to my custom form. I'm using the Bootstrap theme but it doesn't include any type of validation so I decided to use the Bootstrap Validator plugin. Examples of validation can be found here: http://1000hz.github.io/bootstrap-validator/#validator-examples

Drupal Bootstrap: Quick theming tips

Custom Modal Window

Place the button below in your code to trigger the modal window. Click this button for an example:

Drupal Bootstrap: Add magnifying glass search icon to search button and change placeholder text

Out of the box the search button uses the word 'search', but I want to change this so it displays the magnifying glass Glyphicon instead. Also, I want to change the placeholder text from 'search' to something else.

search

To add the icon in our search button we need to us override bootstrap_bootstrap_search_form_wrapper(). We can do this by placing the following code in our theme's template.php file:

Drupal Bootstrap: Navbar drowpdown on hover with fade in transition

I needed to alter the Bootstrap navbar so that the dropdown would appear on mouse hover - Out of the box, it only appears when clicking the link.

Solution One

We need to override bootstrap_menu_link() in our template.php file by commenting out the lines that adds the classes 'dropdown-toggle' and 'dropdown'.

Quick reference to helpful Drush commands

Any good Drupal developer uses Drush. Below is a quick reference to helpful Drush commands.

Clearing the cache:

Form submit AJAX button not woking after inserting form using AJAX

I have a page with a link that when clicked loads and inserts an AJAX driven form into the page. When I click to load the form, AJAX does its business and inserts the form into the page, and when I use the form and submit it, it works fine - AJAX processes the form and my use of AJAX commands in the form callback removes the form from the page. However, if I try to reload that same form by clicking the link again, the form loads up but the submit button no longer uses AJAX. The annoying thing was that all the AJAX behaviors were definitely being reattached to the form.