This topic is locked

How to customize radio button cells?

1/17/2007 4:47:45 PM
PHPRunner General questions
G
gawde author

I have not found any question similiar to this answered in the forum or PHPRunner user manual so here goes....
I have an Edit field defined as a radio buttom input. There are 3 fixed choices (e.g. YES, NO, MAYBE).

I would like the cells containing the buttons to have different background graphics behind the 3 buttons.

For instance: a smile behind the YES button, frown behind the NO, etc..
I can not find the correct routine to apply the code. I think I could have figured it out in 3.0, but the Smarty stuff in 3.1 has me stumped.
Can anyone help? Thanks. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=4407&image=1&table=forumtopics' class='bbc_emoticon' alt=':blink:' />

Alexey admin 1/18/2007

Greg,
Radio controls are created by BuildRadioControl function in include\commonfunctions.php file.

Here is the piece of code that outputs radio buttons:

foreach($arr as $opt)

{

if($opt==$value)

echo '<input type="Radio" name="radio_'.$cfieldname.'" onclick="java script: '.$cfield.".value='".dbaddslashes($opt).'\'; return true;" checked>'.htmlspecialchars($opt)."
";

else

echo '<input type="Radio" name="radio
'.$cfieldname.'" onclick="java script: '.$cfield.".value='".db_addslashes($opt).'\'; return true;">'.htmlspecialchars($opt)."
";

}


Modify it to customize radio button appearance.