cck_n_fields - good module name?

Events happening in the community are now at Drupal community events on www.drupal.org.
amitaibu's picture

I've wrote a small utility module called cck_n_fields, which I'd like to add to d.o. site.

The module allows a user determine the number of multiple fields that should appear in a node add/edit form via URL.
for example: example.com/node/add/story?cck_n_fields[NAME-OF-FIELD]=5 will result with the attached image.

my user case in this module, is that I have a desktop utility that uploads files using CURL.
Do you think the name cck_n_fields is ok? Is it worth a project in d.o. ?

AttachmentSize
snap1.png42.26 KB

Comments

Btw, here's the

amitaibu's picture

Btw, here's the code

<?php
/**
* Implementation of hook_form_alter().
*/
function cck_n_fields_form_alter(&$form, &$form_state, $form_id) {
  if (!empty(
$_GET['cck_n_fields']) && strpos($form_id, '_node_form')) {
    foreach (
$_GET['cck_n_fields'] as $field_name => $value) {
      if (empty(
$form_state['item_count'][$field_name])) {
       
$form_state['item_count'][$field_name] = intval($value);
      }
    }
  }
}
?>

Content Construction Kit (CCK)

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week