[pmwiki-users] Minor edit

Hans design5 at softflow.co.uk
Wed Nov 29 15:19:19 CST 2006


Wednesday, November 29, 2006, 8:58:04 PM, Patrick wrote:

> Actually, in many browsers radio buttons *can* start with none 
> being checked, but once one is checked, it's often difficult to 
> clear them.

> See, for example, http://www.pmwiki.org/wiki/Test/RadioButtons .

Thanks for showing this!
I could not get it working before, but I managed now for the major and
minor changes radio buttons:

In the EditForm instead of the (:input e_minorcheckbox:) :

(:input e_majorradio:) $[This is a major edit]\\
(:input e_minorradio:) $[This is a minor edit]\\

defined in config.php as:

$InputTags['e_majorradio'] = array(
  ':html' => "<input type='radio' \$InputFormArgs />",
  'name' => 'diffclass', 'value' => 'major');
$InputTags['e_minorradio'] = array(
  ':html' => "<input type='radio' \$InputFormArgs />",
  'name' => 'diffclass', 'value' => 'minor');
if (@$_POST['diffclass']=='major') 
  $InputTags['e_majorradio']['checked'] = 'checked'; 
if (@$_POST['diffclass']=='minor') 
  $InputTags['e_minorradio']['checked'] = 'checked'; 


Hans





More information about the pmwiki-users mailing list