Hi,
We are trying to develop a website( role based-content management system).
The requirements are as follows:

There will be a menu option ("Application Form")on the frontpage.
When the end-user clicks on Application Form menu,it should display a form with following text fields.
- Name of Applicant
- Department
- Address
- Email Address
-Submit button

when the user clicks on Submit button,the form should be forwarded to user with the login-ID "CLERK".
Now,the CLERK needs to approve the form submitted by END-USER ,after getting approval from CLERK,the form should be forwarded to SITE-ENGINEER.When the SITE-ENGINEER approves it,it should be forwarded to ENGINEER.

FYI,CLERK,SITE-ENGINEER and ENGINEER are the authorized users who will log-in using there IDs and will act as a authorised person to approve the request.

In short the flow should be like this............
Step I:End user will fill-up the Application Form and submit the form.
Step II:When CLERK will login,the submited application form will wait for approval from CLERK.
Step III:When SITE-ENGINEER will login,the clerk approved application form will wait for approval from SITE-ENGINEER.
Step IV:When ENGINEER will login,the site-engineer approved application form will wait for approval from ENGINEER.

I mean,there will be four users,ENDUSER,CLERK,,SITE-ENGINEER, and ENGINEER and ENDUSER doesn't require any login.The Application Form option will be available on the front-page.Any one can access and use the application form to submit his/her application but it is the resposiblity of CLERK,SITE-ENGINEER and ENGINEER to process that form and put proper comments on the request either on APPROVAL or REJECTIOn of application.

Please guide me to implement such application.Detail guidance is expected as it is URGENT.
Here I am attaching a file which shows my efforts.

Following is the water.module file.

// $Id: page.module,v 1.127 2004/09/29 18:05:11 dries Exp $

/**
 * @file
 * Enables the creation of pages that can be added to the navigation system.
 */

/**
 * Implementation of hook_help().
 */
function water_help($section) {
  switch ($section) {
    case 'admin/help#water':
      return t("
      <p>The water module is used when you want to create content that optionally inserts a link into your navigation system. You can also, however, create waters that don't have this link by skipping the link text field in the water form. At this time, not all themes support the link insertion behavior. Some themes, like xtemplate, provide alternative mechanisms for link creation. waters are also unique in that they shortcut the typical lifecycle of user generated content (i.e. submit -&gt; moderate -&gt; post -&gt; comment). </p>
      <h3>User access permissions for waters</h3>
      <p><strong>create waters:</strong> Allows a role to create waters. They cannot edit or delete waters, even if they are the authors. You must enable this permission to in order for a role to create a water.</p>
      <p><strong>edit own waters:</strong> Allows a role to add/edit waters if they own the water. Use this permission if you want users to be able to edit and maintain their own waters.</p>
      ");
    case 'admin/modules#description':
      return t('Enables the creation of water form that can be added to the navigation system.');
    case 'node/add#water':
      return t('If you just want to add a water with a link in the menu to your site, this is the best choice. ');
  }
}

/**
 * Implementation of hook_perm().
 */
function water_perm() {
  return array('Create Form','Fill Form','Verify Documents','Site Inspection','Money acceptance','Final Approval');
}

/**
 * Implementation of hook_node_name().
 */
function water_node_name($node) {
  return t('water');
}

/**
 * Implementation of hook_access().
 */
function water_access($op, $node) {
  global $user;

  if ($op == 'create') {
    return user_access('Create Water Application Form');
  }

  if ($op == 'update' || $op == 'delete') {
    if (user_access('Edit Water Application Forms') && ($user->uid == $node->uid)) {
      return TRUE;
    }
  }
}

/**
 * Implementation of hook_insert().
 */
function water_insert($node) {
  db_query("INSERT INTO {water} (nid, link, description) VALUES (%d, '%s', '%s')", $node->nid, $node->link, $node->description);
}

/**
 * Implementation of hook_update().
 */
function water_update($node) {
  db_query("UPDATE {water} SET link = '%s', description = '%s' WHERE nid = %d", $node->link, $node->description, $node->nid);
}

/**
 * Implementation of hook_delete().
 */
function water_delete(&$node) {
  db_query('DELETE FROM {water} WHERE nid = %d', $node->nid);
}

/**
 * Implementation of hook_load().
 */
function water_load($node) {
  return db_fetch_object(db_query('SELECT link, description FROM {water} WHERE nid = %d', $node->nid));
}

/**
 * Implementation of hook_menu().
 */
function water_menu($may_cache) {
  $items = array();

  if ($may_cache) {
    $items[] = array('path' => 'node/add/water', 'title' => t('Water'),
      'access' => water_access('create', NULL));
  }

  return $items;
}

/**
 * Implementation of hook_content().
 */
function water_content($node, $teaser = FALSE) {
  $node = node_prepare($node, $teaser);
  return $node;
}

/**
 * Implementation of hook_view().
 */
function water_view(&$node, $teaser = FALSE, $water = FALSE) {
  // prepare the node content
  $node = water_content($node, $teaser);
}

/**
 * Implementation of hook_form().
 */
function water_form(&$node) {
  $output .= form_textfield(t('Department'),'dept',"Water Department",30,60,NULL,NULL,TRUE);
  $output .= form_textfield(t('Ward Number'),'ward',"",30,60,NULL,NULL,TRUE);
  $output .= form_textfield(t('Name'),'name',"",30,60,NULL,NULL,TRUE);
  $output .= form_textarea(t('Address'), 'address', "", 60, 5, '', NULL, TRUE);
  $output .= form_textfield(t('Email'),'email',"",30,60,NULL,NULL,TRUE);
  $output .= form_textfield(t('Phone'),'phone',"",30,60,NULL,NULL,FALSE);
  return $output;
}


I await your reply.

Comments

menesis’s picture

Priority: Critical » Normal

This is not related to online module at all, so I'm closing the issue. These requirements for some site were posted several times elsewhere, in strange places, too. See http://drupal.org/node/17465