Download & Extend

Answer title's default value to be Question's title

Project:Answers
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

I'm planning to unhide / enable the title textfield in simpleanswer. And want to add 'Re: ' then the title of the question in it.

In simpleanswer_form function, under Implementation of hook_form, I added this

function simpleanswer_form(&$node) {
  $form['title'] = array(
    '#type' => 'textfield',
    '#title' => check_plain($type->title_label),
    '#default_value' => answers_answersapi('qtitle', $node->nid),
    '#required' => TRUE
  );

I want to know why '#default_value' => answers_answersapi('qtitle', $node->nid) does not put the (question's) title in this field.

AttachmentSize
answ.gif3.14 KB

Comments

#1

Status:active» closed (won't fix)

No action on this for a *long* time. Marking closed.