I'm having an issue when modifying a fieldset. I'm using the method I outlined in #273411: How to edit registration/lost password forms? to modify the items added to the user_register form by the Mass Contact module. Mass Contact adds a "Group e-mail settings" fieldset to the form with a "Opt-out of group e-mail messages" checkbox.

I can change the checkbox text to "Opt-out of Administrator email messages", but changing the fieldset to "Administrator email settings" is proving to be problematic. (I'd like to just get rid of the fieldset and leave the checkbox, but that doesn't seem to be possible.) When I attempt the modification, the fieldset title changes but I'm also shown an additional "Administrator email settings" text field.

I'm guessing this is a bug in Form Defaults?

Comments

metzlerd’s picture

This is strange. I'm having trouble understanding how my module could be creating a separate textfield box here. That seems particularly odd. Could you reset this form and view source to make sure there isn't some other field that is being hidden by some javascript or something? I'll try and find some time later to download this module and make a similar change, but I don't have time to do that for a few days.

I did a test where I renamed the Menu Settings fieldset in that node page and it worked beautifully.

You're right that I can't remove the fieldset without removing the children as well right now, but you can change the title to blank and make the fieldset not collapsible. It leaves a box around the fieldset, but might be enough for your purposes. Then you could theme this item to remove the box around the fieldset if you wanted.

I tried this strategy to make the menu settings on the edit node form always appear and not have a title and it worked pretty well.

mrtoner’s picture

Your advice for making the fieldset non-visible worked, so I won't spend any more time on this at the moment.

mrtoner’s picture

StatusFileSize
new49.48 KB

Whoops, no, there are some additional screwy things that happen to that form when the fieldset is modified. I'm also using LoginTobbagan to add an email confirmation field; the initial email address field is gone and a non-labeled text field is still there.

metzlerd’s picture

I'd need to see a section of the HTML form source source to understand more where this extra field is coming from, since I can't reproduce your problem. I can't really afford the time to set up a system just like yours to debug it.