Jan 2015
The default contact form in Drupal has quite basic settings. You may only create categories and receiving emails with the default UI admin. To change other preferences such as form title or form destination, we may have to implement override hooks.
In this article, we present some tricks to customize the contact form in Drupal. More tricks will be added regularly.
1. Edit the contact form title
To change the title, add this function to template.php on your theme folder (/sites/all/themes/your-theme/template.php)
<?php
function mytheme_form_contact_site_form_alter (&$form, &$form_state) {
drupal_set_title ('Contact ABC Media');
}
2. Redirect form result
By default, users will be redirected to front pages after submitting the form. It has a strange behavior for users because they may confuse what is going on, whether the message has been sent.
To redirect the contact form to a page of your choice, please add these two functions to your template.php file of your theme, as in section 1 above. I learnt it from a tip of Postrational.
...
Dec 2014
We had a Drupal project, implementing a commerce site for a local store. We use Drupal Commerce, as always, for this type of websites. You may see that we have alot of Drupal Commerce themes on our portfolio.
During the project, there was a minor request from our customer: add the Continue Shopping button to the cart. This feature is available on Ubercart, especially for Drupal 6 Ubercart users. Most of ecommerce sites have this feature as well. But it is not built-in with Drupal Commerce.
As I searched on the Drupal.org issues, I found a very helpful thread: Continue shopping in cart. Zorroposada presented a custom code to achieve it:
<?php
/**
* Implements hook_form_FORM_ID_alter(&$form, &$form_state, $form_id)
*/
function MYMODULE_form_views_form_commerce_cart_form_default_alter(&$form, &$form_state, $form_id) {
$form['actions']['continue_shopping'] = array(
'#type' => 'button',
'#value' => t('Continue Shopping'),
'#weight' => -999,
);
if (isset($_SERVER['HTTP_REFERER']) &...
Aug 2014
We had been always using FAQ module to create Frequently Asked Questions for any of our projects. But on our latest theme, BizReview, we switch to a new module, FAQ Field.
FAQ is a classic module, it is there since Drupal 6. So when we have to build a FAQ section, using this module is a no brainer. This is the FAQ module in action on our Velocity theme.
Recently, when I wanted to download that module again for my new project, I was too lazy to type the full URL, so I google "drupal faq". It happened to display another new module, called FAQ field. I looked at the description and found it...
Mar 2014
When you download and install the Drupal core, it is by default English, as you may know. Our Drupal themes on Symphony Themes are also in English by default. In many cases, I receive requests from customers on how to quickly translate Drupal to their languages (not English, ofcourse).
Here is the guide. It applies to translate Drupal in a non-multilanguage site. If you need more than one language in the same site, you will need to do a lot more stuffs, which can be found on another article.
1. Enable neccessary modules
Please go to admin/modules and enable Locale and Content translation.
2. Add your language
Go to admin/config/regional/language to add your language, please choose it as default language

3. Download the translation manually
Go to h...
Nov 2013
Are you turned off with table content, especially a long table of over 100 rows? It is a nightmare to create a HTML table, look for each tag to enter data.
Recently, I was working on a local project which has a member directory on 63 provinces over the country. Each province has 5 lists of different types of members to keep track with. Each list has an average of 50-100 members. It is not hard to imagine inputing them by HTML is a nightmare.
That's when Table Field comes in handy.
What it does?
Basically, this Table Field module allows you to create a field in your content type with tabular data. You can either enter cell data manually by specifying the number of rows/columns; or you can import from a CSV file.
Using CSV import is the most amazing feature that I need for my project. Just turn Excel files to CSV, upload to each node and it is do...


