So I am trying to make a Sudoku Puzzle module(first module), but I'm having trouble with the formatting. I already have the code working for a straight up PHP version I made a while back, but even that doesn't look too good.
http://imageshack.us/photo/my-images/862/fgfgfgfg.png/
That's the best I could get that looking, but I can't even replicate it for Drupal.
function input_sudoku_form($form, &$form_submit) {
$puzzle = sudoku_make_puzzle();
$initial = $puzzle[0];
$answer = $puzzle[1];
for ($i = 0; $i <= 80; $i++) {
//if ($initial[$i] != 0) {
$form['sudoku'][$i] = array(
'#type' => 'textfield',
'#value' => $initial[$i], //getting problems here
'#prefix' => '<span style="width:42px;height:22;border-width:1;
bordercolor:black;border-style:solid;text-align:center;
display:inline;background-color: Green">',
'#suffix' => '</span>',
'#maxlength' => '1',
'#size' => '1',
);
//}
}
$form['#theme'] = 'sudoku_form_theme';
return $form;
}
This causes each box for a number to be printed down a column, which I am guessing is due to how making a new form works. When done without Drupal, all 81 boxes print on 1 line and I just
echo "
"; after every 9 to get on a new line.