There is no point in presenting users with a required (obligatory) choice of only one option. :-)
So, whenever only 1 (!) newsletter exists, then that newsletter should be selected by default and that required (!) field should be removed, e.g. in following forms:
node/add/mailing
admin/content/simplenews/users/import
admin/content/simplenews/users/unsubscribe
admin/content/simplenews/users/export
Comments
Comment #1
miro_dietikerAs stated: features go into 6.x-2.x or 7.x.
This tiny distinction will add some more complexity to the code and add special cases. In addition it is a risk of additional issues.
We'd need someone to implement this very cleanly to make it into simplenews.
Feel free to work on this and submit a clean patch, while i see many many more issues of much higher importance.
Comment #2
simon georges commentedJust changing the "Component" field, and subscribing, to remind me to work on that one day ;)
Comment #3
simon georges commentedWhat's more, this can cause issues with taxonomy-related modules, so I'm not in favor of having special cases either.
Comment #4
not_Dries_Buytaert commentedWhy not make the fields hidden in this case?
Comment #5
simon georges commentedMoving all feature request to 7.x.
Comment #6
miro_dietikerWe might try this once, adding access=FALSE in FAPI for admin forms.
However, disabling the widget would require a custom widget implementation... Which only hides the widget in some cases. I dunno if we can add this cleanly with a form_alter, staying with the default taxonomy select widget, but setting access=FALSE. Possibly this will break something.
Berdir might be more natively in this topic. What do you think?
Comment #7
berdirIt is possible to set the default category in the field settings, just to go the manage fields screen of the content type, click on edit and select the default category. You can even select different default values for different content types.
Given that and the fact that the option seems to be selected by default of there is only one (according to my tests, where I only had to select an option if there were more than one), I vote to close this issue as working as designed.
If you disagree, feel free to re-open or move back to 6.x if you think that something needs to be changed there. (Just don't expect something to happen if you don't do it yourself).