coder1.com

  • home
  • drupal articles
  • contact
Home

CCK

Adding a CCK Field to a Custom Form

Mike Milano — October 8, 2010 - 1:19am

Recently I wanted to add a CCK combo field into a custom form. Why would you need to do this? Well, my reason was to re-use a combo field with the 'add another item' functionality. Using the node form was not an option.

In this example we have a CCK combo field named "guests". Each guest has a first name, last name, and email address. The content type the guests field is in is my_event.

When adding this code to your form function, the guests field will display just as it does on the node form.

  1. <?php
  2. // include the content file

  • CCK
  • Drupal 6
  • Add new comment
  • Read more

Drupal Search : Index All Fields of a CCK Node

Mike Milano — October 1, 2008 - 3:04am

The Drupal Search API is powerful and pretty intuitive, but finding details on how to do something as simple as enabling searching on fields other than title and body could be a little daunting.

It's actually quite a simple concept. Anything exposed to your node view will be indexed. You can easily accomplish this by editing your content type and setting the Display Fields setting to Plain Text.

  • CCK
  • Drupal
  • Nodes
  • Search
  • Add new comment
  • Read more
Syndicate content

Poll

Have you used any NoSQL Databases?:

User login

  • Request new password

Navigation

  • Recent posts

  • home
  • drupal articles
  • contact