redDIRT's blog

why won't my form element validate?

()

yahoo!

So, just because there is already a lot of code in your template.php, and you can modify your forms with the theme template function, remember that you CAN'T code a validation callback there. Add your callback to the element in the hook_form_alter in your custom module ...


add your form element in custom module NOT in template.php:

Child Menus don't work, even when 'expand' is forced

()

Using the $primary_links variable in page.tpl.php doesn’t include the child items, even when Expanded is selected in the Drupal menu config. I tried a number of different theme functions, but nothing seemed to work. What did work finally was calling from the page.tpl.php

    print theme('menu_tree','primary-links');

For the id, I used the template.php function:

    function phptemplate_menu_tree($tree) {
      $id=strpos($tree,'href="/"')!==FALSE?' id="primarylinks"':'';
      return '';
    }

wordpress blog stats