In my setup (including CCK) the description of a webform is rendered below the form not above. I did not find another solution but to change the weight of the $node->content['webform'] field to make sure it's higher than any other cck field. This should be clearly fixed more properly by the module itself by assigning a weight according the weight of the other node fields. The attached patch should help in most cases for the meantime.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | webform_content_extra_fields.patch | 833 bytes | quicksketch |
| #4 | webform-field-weights.patch | 511 bytes | Mac Clemmens |
| webform.module.patch | 340 bytes | moritzz |
Comments
Comment #1
cdale commentedA better solution would be use hook_content_extra_fields_alter. Something like:
I haven't actually tested this code myself, but I've done something similar in other modules. This way, you can adjust the weight on the webform content type page via CCK.
Comment #2
quicksketchI agree, cdale's approach would be preferable if we're going to be making changes to the weights.
Comment #3
matulis commentedThank You, CDALE!
Tested and works smoothly.
Comment #4
Mac Clemmens commentedTested cdale's recommendation and it worked great! I recommend that it be committed to webform. I've rolled a patch of the changes.
Comment #5
vegancheesesteak commentedThis is extremely useful! Thank you!
Comment #6
moritzz commentedWow, I didn't knew there's such a elegant solution. Thanks cdale.
Comment #7
jkristos commentedI think I'm missing something obvious.
With cdale's above code in template.php, where should I be able to set the weight of that field?
Comment #8
quicksketchThanks, I cleaned up the documentation and comments and committed to the Drupal 6 2.x version.
Comment #9
quicksketchjkristos, This is a change to the module file, not to your theme. After applying the patch, you can reorder the field through CCK's interface for ordering fields at admin/content/node-type/webform/fields.
Comment #10
quicksketch