- $OUT .= "<TR>
- <TD align=\"center\" class=\"switch_sw".$SW." bottom2 right2\">".$id."</TD>
- <TD class=\"switch_sw".$SW." bottom2 right2\"> ".$name."</TD>
- <TD align=\"center\" class=\"switch_sw".$SW." bottom2 right2\">
- ".ADD_SELECTION("yn", $required, "sel[".$id."]")."
- </TD>
-</TR>\n";
+ // Add more data
+ $content['sw'] = $SW;
+ $content['seleciton'] = ADD_SELECTION("yn", $content['field_required'], "sel[".$content['id']."]");
+
+ // @TODO Move this HTML code into a template
+ $OUT .= "<tr>
+ <td align=\"center\" class=\"switch_sw".$content['sw']." bottom2 right2\">".$content['id']."</td>
+ <td class=\"switch_sw".$content['sw']." bottom2 right2\"> ".$content['field_name']."</td>
+ <td align=\"center\" class=\"switch_sw".$content['sw']." bottom2 right2\">
+ ".$content['selection']."
+ </td>
+</tr>\n";
+
+ // Switch color