This topic is locked

Using View as Checkbox

2/10/2006 3:59:20 AM
PHPRunner General questions
H
hbu author

I ' m using "Checkbox" to view a field. That works well on the List Page. On the View page this code is displayed:

<p align=center><img src="images/check_no.gif" border=0></p>

How can I correct that behaviour?

Thanks for your help.

Hans

D
Dale 2/12/2006

I took a bit of time today to look into this one as it was bugging me too. The LIST view worked fine, the view page I would get the same output as you.
I compared the two and found 1 difference in the two.
This is the original block in the View.php.

NOTDBLOOKUPFIELD##

if(Format("##FIELD##")!=FORMAT_HTML && Format("##FIELD##")!=FORMAT_FILE_IMAGE && Format("##FIELD##")!=FORMAT_FILE && Format("##FIELD##")!=FORMAT_HYPERLINK && Format("##FIELD##")!=FORMAT_EMAILHYPERLINK)

echo htmlspecialchars(GetData($rs,$data,"##FIELD##", Format("##FIELD##")));

else

echo GetData($rs,$data,"##FIELD##", Format("##FIELD##"));

##/NOTDBLOOKUPFIELD##



I changed the line
echo htmlspecialchars(GetData($rs,$data,"##FIELD##", Format("##FIELD##")));
to
echo ProcessLargeText(GetData($rs,$data,"##FIELD##", Format("##FIELD##")));
and it worked fine for the view page, with one little issue. I could not get the checkbox tight to the right side. It appeared centered in the table cell.
SO, i went looking for <p align=center>. Found the reverences and changed the center to left.

As soon as I did that, I again go the output as first mentioned. Changed the align=left back to align=center and the display worked fine, except for the centering of the checkbox issue.
Maybe this will help the developers in tracking down the exact issue.