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

miro_dietiker’s picture

Version: 6.x-1.3 » 6.x-2.x-dev

As 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.

simon georges’s picture

Component: Code » User interface

Just changing the "Component" field, and subscribing, to remind me to work on that one day ;)

simon georges’s picture

What's more, this can cause issues with taxonomy-related modules, so I'm not in favor of having special cases either.

not_Dries_Buytaert’s picture

Why not make the fields hidden in this case?

simon georges’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev

Moving all feature request to 7.x.

miro_dietiker’s picture

Assigned: Unassigned » berdir

We 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?

berdir’s picture

Status: Active » Closed (works as designed)

It 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).