Hi,
Again, I'm not far from getting mad :(. I'm developing a module for witch I'm developing a adminpanel. The module I'm creating will enable users to use swf's to replace fonts in their HTML. Something like Sifr, but easier to use.
In the adminpanel I've added an option to manage uploaded fonts. Combined with lots of frustration, I've managed to create a table with the uploaded fonts and checkboxes, witch should enable the administrator to delete fonts. (Thanks to http://drupal.org/node/112358).
Now the next step would be validating the form. This is where I'm stuck. All form elements are accessible, but from the checkboxes I can't get the values (whether they are checked, or not). I must be overlooking something but I can't find it! Please help!
The form:
<?php
function flash_text_fonts_form() {
$font_list_table_rows = array();
$font_folder = variable_get("flash_text_font_folder", "files/flash_text");
if($handle = opendir($font_folder)) {
while (false !== ($file = readdir($handle))) {
if(preg_match("/^(.+?).swf$/", $file, $matches)) {
array_push($font_list_table_rows, array("title" => $matches[1], "file" => $matches[0]));
}
}
}
$form['header'] = array('#type' => 'value', '#value' => array(array('data' => 'nid'), array('data' => t('Title'))));