Drupal, form, #pre_render

If you are getting the following error message after adding a new element in any of your pre_render functions, then you haven't created all the necessary properties for that element:


warning: implode() [function.implode]: Bad arguments. in /home/ju/public_html/drupal-5.1/includes/form.inc on line 618.

When adding elements in a pre_render function, these properties must be manually added:

  • #description
  • #required
  • #tree
  • #post
  • #parents
  • #attributes
    • An example can be found in the biblio module.
      This is true for Drupal version 5.1.