Gossamer Forum
Home : Products : DBMan : Customization :

Adding Two Fields and save to Third Field issues

Quote Reply
Adding Two Fields and save to Third Field issues
Morning all. After browsing through the FAQ site, I found some code that has helped guide me, but yet I have had zero success. Here is what I'm trying to do.

So far I have added:
$in{'CITYSTATE'} = $in{'CITY'} + $in{'STATE'}; in db.cgi under the sub add_record routine.

Then I added:
'CITYSTATE' => [87, 'alpha', -1, 255, 1, '', ''] to my default.cfg file.

Then I have this:
<input type="hidden" NAME="CITYSTATE" VALUE="$rec{'CITYSTATE'}"> in my html.pl file under sub html_record_form.

Anyways, the purpose of this CITYSTATE field is so I can: print &build_select_field_from_db("CITYSTATE",$rec{'CITYSTATE'}); use this in my short search routine.

Any help would be greatly appreciated.

PS...I do have $rec{'CITY'} and $rec{'STATE'} fields in my default.cfg and this is a working dbase.

Thanks
Theri


NOTE: I have it writing, somewhat but it is writing a "0" instead of the Field Data.