Home > drupal, drupal 7, field api, form api > Drupal 7 Gotchas- Title not visible in “Add form” page AND Custom Node Not Visible in the “Content Types Edit Structure” page.

Drupal 7 Gotchas- Title not visible in “Add form” page AND Custom Node Not Visible in the “Content Types Edit Structure” page.

So I had implemented hook_node_info wherein I had specified the “has_title” as TRUE, but inspite of that I could not see the Title Field in the “add node” form and also I could not see my custom content type listed in the content types “edit structure” page. This being despite the fact that I had also implemented hook_node_form

After much ado I realized that I had specified a “base” in hook_node_info which was different from my module name. But I had implemented hook_node_form using my module name and NOT the base name.

Therein lied my fault.

Advertisements
Categories: drupal, drupal 7, field api, form api Tags:
  1. jeetendra kumar
    June 5, 2013 at 4:00 pm

    Add new field in hook_node_form function:
    $form[‘title’] = array(
    ‘#type’ =>’textfield’,
    ‘#title’ => t(‘Title’),
    ‘#required’ => TRUE,
    ‘#default_value’ =>”,

    );

  2. October 17, 2013 at 9:21 pm

    Every weekend i used to go to see this web site, for the reason that i wish
    for enjoyment, for thee reason that this this web
    site conations actualoly pleasant funny material too.

  3. May 19, 2014 at 5:18 pm

    We’re a group of volunteers and opening a new scheme in our community.

    Your website offered us with valuable info to work on. You’ve done an impressive job and our
    entire community will be grateful to you.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: