An essential feature of a dynamic site would be to let its users add some contents to it. Often this is done using HTML forms. Drupal offers a rich and relatively simple way to use API for building forms for its Developers. In Drupal parlance it is referred as Form API (or FAPI).
This is a follow up of earlier blog post How import / export quiz questions to Drupal. As mentioned earlier Quiz questions import (qq_import) module is the one of the potential modules to import quiz question into Drupal from external sources. The Drupal 7 version of the same has been just released and this version includes a major architectural change from the previous release i.e. we have developed to take the advantage of Feeds module.
Often times it is needed to create module specific custom tables to store persistent data. Drupal offers a set of hooks in connection to this. Most commonly used among these are hook_schema() and hook_update_N(). First hook, hook_schema() holds the structure of table in the form of PHP array.
Every small finding is worth sharing. This blog post is no except for this fact. Drupal ships with a module for blogging since a long time. This mighty module offers a potential multi-user blogging feature to Drupal site. This is an essential module for most of the contents publishing site. Blog content has been architectured to leverage node. A new blog can be created by any user with permission "Blog entry: Create new content" as of Drupal 7.
At KnackForge, MySQL has been the primary choice of persistent backend storage. Late-off one of the Drupal sites we maintain had grown to accomodate thousands of contents. This inturn introduced the need for having a different strategy for backup. More details about the project will be shared in the follow up post. For this post I would like to share a simple configuration trick that helped us to speed the restoration process from SQL dump.
HTML 5 has been encompassed with many novel attributes, one of which is the Placeholders. The Placeholder attribute displays text in the input field till it is focused and then hides the text on click. These Placeholders plays an momentous role in offering a visual information about the field. A general place where I prefer to add Placeholders is template.php in your theme.
Rules no novel to Drupal area, are always considered as the unsophisticated way to accomplish action. A paradigm of rule's dominance can be witnessed in sending a mail after a user account creation, Blocking a Specific user from accessing the site, Providing access to products in Drupal Commerce, etc. Rules can be created either programmatically or by using piece of code.
Lets think that we have a custom table to show list of records. Sometimes you might have to provide editable options for column. One simpler solution is to have a edit link and open up a form and let the user update the records. But a much more simple user experience will need inline editing of columns. Simply using theme('table') with textfields might not work since theme_table will run on the render array, your form elements will actually be rendered out to the screen, but the form won't have any knowledge of the values (as they are not technically children of the form) .