Technology has completely changed the way businesses were operated in the past. Now, marketers can make their products available to the customers at their finger tips at any place and time. About two decades ago, nobody could ever imagine that buying and selling would be carried out in such a seamless manner sans the brick and mortar retail outlets. All this has been possible only because of technological advancements. Technology is progressing in leaps and bounds, opening newer avenues for success.
Drupal Technical
Form API validation is a contributed module which allows us to write the validation rules in custom forms, without the use of hook_validate/form_validate function
To submit a Drupal form, suppose a registration form to Hubspot we need the following.
While using the D3 implementation in one of my project for collapsible tree, I used the following piece of codes to add dragging and zooming feature in the tree. At first I have downloaded the D3 JS and loaded to the page callback as specified in the D3 implementation notes.
Simple news module is used to integrate newsletter subscriptions to a drupal website. Simplenews publishes and sends newsletters to lists of subscribers
The Commerce Card on File module provides an API with a user interface for storing and reusing credit card data on subsequent orders. This module didn't hold full card numbers locally. Instead of this it stores the remote ID of the full card data from the payment gateway that is used to validate and process your credit card transactions.
drupal_add_js() function is mainly used to add JavaScript to the page, either as reference to an existing file or as in-line code (by writing the code directly in the page). But it also add settings to Drupal's global storage of JavaScript settings. These settings can access using Drupal.settings variable in JavaScript file.
We can create custom rules programmatically using the function hook_rules_action_info(). hook_rules_action_info() is a useful hook provided by rules API to create custom rules programmatically. We can use our custom functions to perform the actions that we require.
Following is a sample of the hook_rules_action_info implementation:
The Paragraphs module is a new way of content creation. Instead of putting all contents through WYSIWYG body field, including videos and images, end-users can now choose on-the-fly between pre-defined Paragraph Types independent from one another.
In Drupal 7, when we do customizations we would want the custom module to create content in the form of a render array. We know that a page callback should return a render array which allows the custom module to handle the content as long as possible in the page generation process. Sometimes, wrapping two render array elements together could be an easy way out while dealing with render array manipulations. Here is how we can achieve that.
Drupal offers a variety of ways to implement solutions when it comes to custom theming and it has been abused often due to the very same reason. Choosing the right way is what Drupal developers find tricky. If it is not done right, it is quite likely that you 'Awesome Drupal Website' would turn into a code-monster soon. This can even make maintenance difficult. Hope this 'tiny bit of' information could help you through it.
In Drupal 7, a theme function is a PHP function that is used to wrap the output variables with HTML. For adding a theme function in our custom Drupal 7 module, we need to implement hook_theme(). A theme function is prefixed with 'theme_'. However, they can't override existing theme functions. Such functions are invoked using theme() rather than being directly called. Also, they are faster compared to the template (.tpl) file implementations.
In one of my Drupal projects, I had a requirement to submit data from a webform to an external application. hook_webform_submission_insert() helps to meet my requirement. In your custom module, call the hook function hook_webform_submission_insert().
The last release of Drupal was about three years back and Drupal lovers - site builders, developers and administrators - are more than excited to get their hands on the hottest addition to the Drupal Web Development family, Drupal 8. With over 1700 contributors working diligently at building the latest version of Drupal, it comes as no surprise that Drupal 8 has exceeded the expectations of its loyal users and arrived with a bang.
While working on a Drupal 6 project, I came across the requirement to send some mails. Interestingly, I couldn't find any good articles or procedures on the same. So, here, I am going to explain how to send mails in Drupal 6 with attachments. If you need any business support, get in touch immediately.
The purpose of implementing hook_theme either in a custom module or theme is to register it's theme implementations which specify how a particular render array is to be rendered as HTML.
As the name suggests, a preprocess function is a precursor to a theme function. It runs first, irrespective of the fact that the theme function can also be implemented as a template (.tpl file) rather than a function. Preprocess functions can be implemented in both modules and themes. However, the preprocess implementations from modules run first, and those by themes run only last.
In one of my project, I want to display a hierarchical structure of an array by using D3 JS, which should be collapsible. Lets checkout how we can implement, D3 JS in Drupal 7 with collapsible concept. Do you want the implementation like this, get a quote and make use of our expertise.
Drupal has grown to be recognized as the most powerful and practical modular framework used by numerous website developers and business owners. The CMS community has adapted to the versatile and extremely functional structure of Drupal very quickly and Drupal modules have risen high on the must-have charts of web developers.
The drupal_write_record function is used to insert or update a record in the database based on the schema of the table. It helps in executing less database query. Let's take a look at the function given below.