How wd I go about getting the auto title to form from the first 50 characters or so of the body?
I'm assuming a php snippet is required here, but I don't "know PHP" so if someone doesn't mind giving me a little code here for that, I'd appreciate.

Comments

404’s picture

subscribing

aharown07’s picture

Got an idea to look at comment.module and see how it constructs Subject field from the comment body.
I believe it happens here

if (variable_get('comment_subject_field_'. $node->type, 1) == 1) {
$form['subject'] = array('#type' => 'textfield', '#title' => t('Subject'), '#maxlength' => 64, '#default_value' => !empty($edit['subject']) ? $edit['subject'] : '');
}

So I suppose this is a clue, but I don't how to use it yet, especially in a node.

stormsweeper’s picture

aharown07’s picture

Status: Active » Closed (duplicate)

That's what I was looking for, thanks! I figured it wd have to be some PHP. Will give that a try ad post at #369694: Creating title from node body text