开发者

Looking for ideas to implement an anonymous Suggestion Box in Drupal

I have a need to allow authenticated users to create content in Drupal anonymously. Ideally something like a Suggestion Box. The s开发者_如何学Pythonuggestion should have no fingerprint of who submitted it and ideally it should be submitted but not published until it is reviewed and approved.

Looking at the contact form and other modules, I haven't been able to get a clear direction on how to do this. Ideally I would think that at submission, I'd like to override the Authored By field and set this to anonymous. Is this the right direction or can I create a simple form that would be emailed to someone without ever creating a node?


I would suggest just creating a form using webform module.


If you don't want a node, just create a simple php form that sends a mail() on completion. You will need to enable the PHP filter and then just create a page with the PHP form in the content area.

If you wanted a node, you could create a custom content type called suggestions and then use a custom module to remove the author tag using hook_form_alter.

function uofm_usertasks_form_alter(&$form, &$form_state, $form_id) {

  switch($form_id)
  {
    case 'suggestion_node_form':
      $form['authored']['name']['#access'] = FALSE; // not sure if this is the right item in the form or not
      break;
  }

}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜