This topic is locked

Formating Checkbox List in View Page

10/28/2010 6:24:36 AM
PHPRunner General questions
T
tsp003 author

Hi,
Say I've created a field that is edited as a lookup wizard/checkbox list. In view page the selection seems to be badly formatted. ie, if the user is selecting certain days of the week, it appears on the view page as "Monday,Wednesday,Friday" without spaces after the generated commas. Ideally, i would like to display each selection vertically, at a basic level i would at least like to be able to place a space after each comma.
What do i need to do to change the way the selection chosen on the add or edit page is displayed on the view page? Thanks

A
ann 11/4/2010

Hi,
use Custom format on the View as settings dialog to display field vertically.

Here is a sample code for this:

if ($data["Field1"]){

$arr=explode(",",$data["Field1"]);

$value="";

foreach ($arr as $elem){

$value.=$elem."
";

}

}