Gossamer Forum
Home : Products : DBMan : Installation :

This drives me crazy - modifying a record.

Quote Reply
This drives me crazy - modifying a record.
Let's say I am not the best in Perl programming :-)
Therefor I cannot solve this problem.
When modifying a record the drop down and the checkbox fields are empty.
I know why: Because I haven't assign them the $rec{'var'} variables. So far so good.

For normal text expressiosn I used the following syntax:
---------------
<input type=text name="Name" value="$rec{'var'}" size="40" maxlength="255">
---------------
But what should I use for Select fields and Drop Down boxes ????
I tried:
---------------
|; print &build_select_field("Category","$rec{'Category'}"); print qq|;
---------------
....but it didn't work.
Here the two fields from the sub html_record_form which should be corrected:

1) The Drop Down Menu:
---------------
<td WIDTH="80%"><select NAME="Category"><option>---<option>Jewelry<option>Lumber and Wood Products</select></td>
---------------

2) The select fields:
---------------
<td WIDTH="80%"><input TYPE="RADIO" NAME="Status" VALUE="Offer to Sell" CHECKED>Offer
to Sell <input TYPE="RADIO" NAME="Status" VALUE="Offer to Buy">Offer
to Buy </td>
---------------

Should be no problem for a better programmer than me but sometimes you don't see your own mistakes...

Thanks a lot
Quote Reply
Re: This drives me crazy - modifying a record. In reply to
Have you defined your categories within the checkbox portion of your .cfg file?

My best suggestion would be to visit JPDeni's web site and use her configuration to setup your database fields.

This is an excellent resource and will help you to get your database up and running quickly. You can then just modify the formatting to suit your needs.

Visit:

http://www.jpdeni.com/