hello my friends
how can I enable form block for FAQ_ASK form? - to make the users submit question from a block
the form block modules http://drupal.org/project/formblock
and if there are another way to put the FAQ_ASK form in a block plz help me about that,
I test short form but its ignore the question text area?
thanks
best regards

Comments

nancydru’s picture

Assigned: math_1048 » Unassigned
Status: Active » Postponed (maintainer needs more info)

From what I see in that module's description, it applies only to node modules. In this case, while Faq_Ask may look like a node module, it is actually FAQ that is the node module. So I'm not sure that module can be applied. If someone wants to work on this, I will be happy to apply and test patches.

math_1048’s picture

Thank you very much dear Nancy
I try to write new block contain the Faq_Ask form
by add the new block in the "Implementation of hook_block()", section with $block['content'] = faq_ask_form() fuction, but I get an error message,
I know this is because I am newbie in drupal :).
thank you again

nancydru’s picture

I just real quickly tried this and it works. I may just leave it in and commit it.

function faq_ask_block($op = 'list', $delta = 0, $edit = array()) {
  global $user;
  switch ($op) {
    case 'list':
      $blocks[0]['info'] = t('Unanswered Questions');
      $blocks[1]['info'] = t('Ask a Question');
      return $blocks;

    case 'view':
      switch ($delta) {
        case 0:
          // Unanswered Questions.
          // First, let's deal with a change in module dependencies.
          if (_faq_ask_check_dependencies()) {
            $block['content'] = _faq_ask_list_unanswered(variable_get('faq_unanswered_count', 3));
          }
          break;

        case 1:
          $block['content'] = faq_ask_page(null);
          break;

      } // end switch($delta).
      return $block;
math_1048’s picture

WOW , thanks you are amazing
will plug it soon
thanks again and best regards

nancydru’s picture

Assigned: Unassigned » nancydru
Status: Postponed (maintainer needs more info) » Fixed

Committed to -dev on both branches.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.