I'm implementing a new widget (or a widget option, depends on the answers to this thread ...).
Goal: I want to create a "radio_other" widget.This widget is the usual radio one, but has an additional option "other" with a textfield attached. If the user chooses the "other" option, the value in the textfield will be stored.
There are a couple of possible ways to go about it
a) create a new widget
b) add a flag "allow_other" to template::element::create
b) add a flag "widget_options" to template::element::create, that would pass optional widget values to the specific widget (like allow_other or nospell)
Option a) is easier to implement, but introduces tons of widgets.
Option b) is the way that was used for spellchecker support. I don't like it that much because it forces template::element::create to know about attributes that are only specific for one widget.
Option c) sounds like the cleanest solution to me, but also the most work.
Either way, what do you think which way should be pursued? Furthermore, does this require a TIP ?