After some testing it seems that the form id's don't work properly on node edit forms. There's a form_id passed into the form_alter hook but on a node edit form that id also represents the type of form. For example, "page_node_form" for the page content type. However, in the actual html of the page the id on the form is simply "node-form".

In your form_alter function you run something like:

-		  drupal_add_js('$(document).ready(function(){$("#' . str_replace('_', '-', $form_id) . ' select").sexyCombo(' . $settings . ')});', 'inline');

str_replace('_', '-', $form_id) will generate page-node-form instead of node-form. But it seem that you should actually be using $form['#id'] for this so that it uses the /actual/ id of the form.

The attached patch fixes this.

CommentFileSizeAuthor
form_beautifier_form_id.patch1.02 KBhadsie

Comments

pitxels’s picture

Patch worked for me, I hope it can be included in code