I'm using Drupal 6.4 here, and I went to add a new CCK content type to use for user profiles and noticed that the fieldset with the checkbox that enables a content type to be used as a Content Profile is way down at the bottom of the form, even after the submit button. (See attached image.) I feel like the submit button should always be last.
Looking in content_profile.module on line 156, in function content_profile_form_alter I see that that fieldset's weight is set to 32. Setting it to 1 makes this the last fieldset on the form (even with Location and FeedAPI in use), but before the submit button. That's the desired behavior, right? Here's a patch that changes the weight to 1.
Let me know if it's just me that's experiencing this issue or if this happens for everyone.
| Comment | File | Size | Author |
|---|---|---|---|
| fieldset_weight.0.patch | 694 bytes | akahn | |
| Picture 1.png | 33.72 KB | akahn |
Comments
Comment #1
akahn commentedRealized I should mark this as having a patch.
Comment #2
kenorb commentedSolution without any patch:
The problem is that user_register form has set some default weight and we can't change our weight on content type form.
We can change weight of our form or user_register form using form_alter().
Or we can change our weight in form changing hidden settings in content type edit form.
In example using Firefox with Firebug console:
Go to 'Manage fields' and configure your specified form which you want to put before user registration form (e.g. /admin/content/node-type/your_content/groups/some_group)
Run in Firebug Console:
$('#edit-weight')[0].type = 'input'
to show hidden weight and change it e.g. to 0.
Comment #3
fagotry the latest dev snapshot, it should work right with it.
Comment #4
kenorb commentedComment #5
kenorb commentedI've tried lastest snapshot, but it doesn't work for me.
Still form is under 'Create new account' button.
Comment #7
geraldito commentedthanx kenorb for your smart solution using firebug.
Comment #8
nghiadhcntt commentedSimple disable javascript on your browser and access sorting fields in content type