How I determine which template or form is responsible for processing node of page with this URL: mysite.com/node/node-number/edit ?

I think, that Drupal find the template of edit in this files:

page-node- node-number.tpl.php

However, in my theme folder I have only page.tpl.php without the code of edit template, but edit template is worked.

And in template.php i heve this preprodsse_node:

function my_theme_preprocess_node(&$vars) {
    $node = $vars['node'];
    switch ($node->type) {
        case 'page':

Now I think that the CCK module to generate this form. I can change one field or a behavior of the form?


I need to change some input in edit form. And I can't use a different version of Drupal :(

  • The true answer of my question is: CCK module create a template for edit node
    – Sergey
    Commented Jun 7, 2016 at 11:16

1 Answer 1


If you want to change the default value of fields in node edit form. You should looking on any *.tpl.php files. You have to define your own custom module and use hook_form_alter

You can use this if-statement inside the hook function.

// remember change [nodetype] to the one you want to alter.
if($form_id == 'nodetype_node_form'){
    // your code here
  • Thanks! How i can to change form action after user click submit?
    – Sergey
    Commented Jun 7, 2016 at 9:51
  • You can define a new submit function and append into the form submit array. $form['#submit'][] = 'your_form_submit_function'
    – Jimmy Ko
    Commented Jun 7, 2016 at 9:53
  • Now if the form is submitted, CCK update some field in mysql database. I need to change this, because in one form input contains three values, and this values need to be recorded in three fields in databse.
    – Sergey
    Commented Jun 7, 2016 at 10:11
  • You can retrieve the submitted value in $form_state['#values']. You can do whatever you want then.
    – Jimmy Ko
    Commented Jun 7, 2016 at 10:14
  • I would recommend you post a new question with more details of your case. Comment is not a good place for answering long question with lack of information.
    – Jimmy Ko
    Commented Jun 7, 2016 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.