Needs review
Project:
Form Beautifier
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Dec 2009 at 09:25 UTC
Updated:
17 Dec 2010 at 01:15 UTC
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.
| Comment | File | Size | Author |
|---|---|---|---|
| form_beautifier_form_id.patch | 1.02 KB | hadsie |
Comments
Comment #1
pitxels commentedPatch worked for me, I hope it can be included in code