Web Dev

CCK Field validation

Fred's picture

When using CCK Fields, you can validate the input by using the CCK Field Validation module. Being a bit slow on the uptake, I took me a while to work out exactly how to do this. It turns out to be very simple:

if ($node->field_ police_constabulary[key] == 'Select Force/Location') {
  form_set_error('field_police_constabulary','must choose a police force to post an Intelligence Report');
}

CCK (Content Construction Kit)

Fred's picture

CCK (or Content Construction Kit) is one of the most important modules to help the new, and even seasoned, Drupal website creators. Rather than having to painstakingly create your new content type by hand in a custom module, CCK allows you to create a new content type with a few clicks of a mouse.

The quest for a proper Search feature for The Missing List

Fred's picture

While Drupal is a fantastic piece of software, there is one area in which it is truly terrible - searching. The built-in search is barely able to search Title and Body fields, let alone CCK or custom fields. Ohh, and if you are looking for Bournemouth for example, Bourne, bourne*, etc wont work. You have to use the full word you are looking for.

Views and Views 2

Fred's picture

Views and Views 2 are complex modules, almost worthy of an entire dead-tree edition book to themselves!

While they can make life so much easier when creating your Drupal powered website, they are by their very nature tricky to configure correctly and sometimes frustrating in their quirks. I have come across several issues with the original version of Views, not bugs as such, but more "How the hell do I do ...?" or "Why is it doing that when it's supposed to be doing that!"

Views 2 is very different!

Fred's picture

I like to think that I have a fair understanding of the workings of Views for Drupal 5. Not a very in-depth one, but enough to get me where I want to go. Having installed Drupal 6 here, I installed Views 2. Boy was I in for a surprise!

Useful ASP Classic Snippets

Fred's picture

Sometimes an update to my ASP knowledge comes along and just cries out for some notes. Here are those updates.

Language Reference

Fred's picture

Sometimes I forget how a particular feature of ASP Classic VBScript is called.

Drupal Hints & Tips

Fred's picture

During my exploration of Drupal, there are times when I need to note down helpful hints and tips. Some of them are complete and can be used as-is, most are just pointers.

Syndicate content