1 edb Sep 10, 2008 19:52
3 yabba Sep 11, 2008 10:12
See if this is off any use ;)
inc/plugins/model/_plugins_admin.class.php approx 75 wrote:
* - PluginSettingsEditDisplayAfter (Called after standard plugin settings are displayed for editing)
* - PluginSettingsValidateSet (Called before setting a plugin's setting in the backoffice)
function PluginSettingsEditDisplayAfter( $params )
{
$current_value = 'bar'; // you'd set this dynamically ;)
$params['Form']->radio( 'foo_input', $current_value, array(
array( 'foo', 'foo_label' ),
array( 'bar', 'bar_label' ),
),'my radio label' );
}
¥
4 edb Sep 11, 2008 10:23
Wow thanks. I should give it a go but I already did my thing with a select box and text.
I should hurry up and put out videoplug_plugin 2.9.2.0 (or will it be 2.9.2.1?) before y'all come up with b2evo v3.whatever ...
Hi EdB,
I think there is some technical problem with radio buttons. Can't think of any other reason for this omission.
Nevertheless you can really do anything with checkboxes but you may need to set a defaultvalue again since the user can disable them all. I mean not only setting a defaultvalue, but doing so again at the point where you *get()* this value because it may be empty / NULL if the user unchecked everything. The user couldn't have done so with *real* radiobuttons.
Good luck