Темизация форм полей CCK. Fatal error!

Главные вкладки

Аватар пользователя yurgon yurgon 25 октября 2009 в 8:12

Привет столкнулся с такой проблемой. Не как не могу затемить текстовое поле ССK. Что имею :

<?php[#tree] => 
    [#parents] => Array
        (
        )

    [#method] => post
    [#required] => 
    [#attributes] => Array
        (
            [enctype] => multipart/form-data
        )

    [#programmed] => 
    [#token] => artist_node_form
    [#description] => 
    [#id] => node-form
    [#cache] => 1
    [#post] => Array
        (
        )

    [#processed] => 
    [#defaults_loaded] => 1
    [#content_extra_fields] => Array
        (
            [title] => Array
                (
                    [label] => Заголовок
                    [description] => Форма модуля материалов
                    [weight] => 58
                )

            [revision_information] => Array
                (
                    [label] => Информация о редакции
                    [description] => Форма модуля материалов
                    [weight] => 62
                )

            [comment_settings] => Array
                (
                    [label] => Установки комментариев
                    [description] => Comment module form.
                    [weight] => 64
                )

            [language] => Array
                (
                    [label] => Язык
                    [description] => Locale module form.
                    [weight] => 60
                )

            [menu] => Array
                (
                    [label] => Настройки меню
                    [description] => Menu module form.
                    [weight] => 59
                )

            [path] => Array
                (
                    [label] => Path settings
                    [description] => Path module form.
                    [weight] => 63
                )

            [nodewords] => Array
                (
                    [label] => Nodewords
                    [description] => Nodewords fieldset.
                    [weight] => 61
                )

        )

    [#pre_render] => Array
        (
            [0] => content_alter_extra_weights
        )

    [#submit] => Array
        (
            [0] => menu_node_form_submit
            [1] => auto_nodetitle_node_form_submit
        )

    [#field_info] => Array
        (
            [field_surname] => Array
                (
                    [field_name] => field_surname
                    [type_name] => artist
                    [display_settings] => Array
                        (
                            [label] => Array
                                (
                                    [format] => above
                                    [exclude] => 0
                                )

                            [teaser] => Array
                                (
                                    [format] => default
                                    [exclude] => 0
                                )

                            [full] => Array
                                (
                                    [format] => default
                                    [exclude] => 0
                                )

                            [4] => Array
                                (
                                    [format] => default
                                    [exclude] => 0
                                )

                            [2] => Array
                                (
                                    [format] => default
                                    [exclude] => 0
                                )

                            [3] => Array
                                (
                                    [format] => default
                                    [exclude] => 0
                                )

                            [token] => Array
                                (
                                    [format] => default
                                    [exclude] => 0
                                )

                        )

                    [widget_active] => 1
                    [type] => text
                    [required] => 1
                    [multiple] => 0
                    [db_storage] => 1
                    [module] => text
                    [active] => 1
                    [locked] => 0
                    [columns] => Array
                        (
                            [value] => Array
                                (
                                    [type] => varchar
                                    [length] => 50
                                    [not null] => 
                                    [sortable] => 1
                                    [views] => 1
                                )

                        )

                    [text_processing] => 0
                    [max_length] => 50
                    [allowed_values] => 
                    [allowed_values_php] => 
                    [widget] => Array
                        (
                            [rows] => 5
                            [size] => 30
                            [default_value] => Array
                                (
                                    [0] => Array
                                        (
                                            [value] => 
                                            [_error_element] => default_value_widget][field_surname][0][value
                                        )

                                )

                            [default_value_php] => 
                            [label] => Фамилия
                            [weight] => 37
                            [description] => 
                            [type] => text_textfield
                            [module] => text
                        )

                )?>

...............

Далее пишу как обычно в template.php

<?php$form['field_surname']['widget']['label'] = t('Заголовок')?>

И получаю вот такую ошибку:

Fatal error: Unsupported operand types in /home/*******/domains/*****.com/public_html/includes/common.inc on line 2877

Что не так делаю?

Спасибо.

Комментарии

Аватар пользователя yurgon yurgon 28 октября 2009 в 18:06

пишу так в tamplate.php

<?phpfunction art_theme() {

  return array(
    // ID формы
    'artist_node_form' => array(
      // Формы всегда имеют аргумент form
      'arguments' => array('form' => NULL),
    ),
  );
}

function art_artist_node_form($form) {

unset($form['field_surname']['widget']['label']);

//$form['field_surname']['widget']['label'] = t('Мой заголовок');
 $output .= drupal_render($form);
 return $output; 

  }

?>

Ну не хочет убрать заголовок у поля...

что делать?