Hello, is there a possibility to view fields within the list as a checkbox? Edit as checkbox can be formatted as a checkobx , but it would be much easer to unterstand the sense of the data, if user could see a checkbox instead of "0" or "1" in the list-view. With best reguards punchbyte
Hi, to view checkboxes on the List/View pages do the following:
open \include\..._functions.php with any text editor.
find this code snippet:
function GetData($rs,$data,$field, $format)
{
global $fieldlist,$strKeyField, $strKeyField2,$strKeyField3,$thumbnail_fields,$thumbnail_prefixes,$thumbnail_maxsize;
$ret="";
// long binary data?
if(IsBinaryField($rs,$field))
{
 $ret="LONG BINARY DATA - CANNOT BE DISPLAYED";
} else
 $ret = $data[$field];
if($ret===false)
 return "";
and insert right after it the following one:
if(strtoupper($field)==strtoupper("FieldName"))
{
 if($ret)
 return "<input type=Checkbox checked disabled>";
 else
 return "<input type=Checkbox disabled>";
}
where FieldName is your checkbox field name.
5012358/29/2005
I had the same concern, and when I added your snippet - I got the words <checkbox checked> or <checkbox checked disabled> instead of the checkbox graphic. What am I doing wrong?
admin8/30/2005
Sorry, you should set View as type - HTML for this field on Formattingtab in PHPRunner, then build the pages and then make modifications.