If you want to add your own submit button besides "Preview" and "Submit" in node-types form, you normally think you will form_alter and add your button with let's say a weight of 1000 so it sinks. But no, node.module uses theme_node_form() to custom theme this form, so _whatever_ you do, it will render your buttons somewhere that you can't control using weights.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | mw_50.patch | 1.76 KB | moshe weitzman |
| #1 | node_submit_buttons.patch | 1.66 KB | AmrMostafa |
Comments
Comment #1
AmrMostafa commentedThis is a a simple solution to for this simple problem. Very similar to this snipper which is already in node_filter_form():
Comment #2
moshe weitzman commentedI wish I had looked here before redoing this patch. Anyway, here is a refreshed version. Works as advertised.
Comment #3
gábor hojtsySimple, straightforward, and with previous practice, so committed.
Comment #4
(not verified) commentedComment #5
samo commentedWas this mod only applied to 6.x?
Comment #6
gábor hojtsyIt would break backward compatibility on the form, so no way to apply it to 5.x IMHO.