Gossamer Forum
Home : Products : DBMan : Customization :

adding one numeric field to another

Quote Reply
adding one numeric field to another
Hello Folks,

Could anyone point me the best place in dbman code to modify a field (I want to add a numeric field to another) when the user has modified the record.

Also, I'd like the sum field (the one to which I will add a field) to be read-only.

Thanks in advance,
delh
Quote Reply
Re: adding one numeric field to another In reply to
You're wanting to modify the field after the user has clicked the "modify" button? Or before?

If it's after the user modifies the record, you would need to add the code to sub modify_record in db.cgi. If it's before the user modifies the record, add the code to sub html_modify_form_record in html.pl.

As for making the field visible, but not editable, you would use

Code:
<input type="hidden" name="fieldname" value="$rec{'fieldname'}">$rec{'fieldname'}


------------------
JPD