hi guys
i,ve searched around but couldnt find out how to accomplish this with D7 in D6 i had
<?php
function mymodule_form_award ($form, &$form_state) {
$checkboxes = array();
//changed below to meet D7 way
$rows = "SELECT * FROM awards WHERE awardtype='small'"; // this is a typical query from the node table to get some info about nodes
$result = db_query($rows);
foreach($result as $row)// = db_fetch_array($rows)) // we loop through the results
{
$checkboxes[$row->AWARD_ID] = ''; // a blank value is given so that the checkboxes have no title and are just rendered as a blank checkbox
$form['DESCRIPTION_display'][$row->AWARD_ID] = array('#value' => $row->DESCRIPTION);
$form['DESCRIPTION_' . $row->AWARD_ID] = array ("#type" => "value", "#value" => $row->DESCRIPTION);
$form['award_imag_display'][$row->AWARD_ID] = array ("#value" => $row->award_imag);
$form['award_imag_' . $row->AWARD_ID] = array ("#type" => "value", "#value" => $row->award_imag);
$form['reason'][$row->AWARD_ID] = array('#type' => 'textfield', '#required' => True, '#maxlength' => 255, '#size' => 100, '#value' => $row->reason,'#default_value' => '');
};
$form['date'] = array(
'#title' => t('Date of award'),
'#type' => 'date',
'#description' => t('Enter the Date of awardl'),
'#required' => TRUE,