Gossamer Forum
Home : Products : DBMan : Customization :

Need code for hidden date field

Quote Reply
Need code for hidden date field
I have tried the following:

<input type=hidden name="Date" value="$rec{'Date'}">

Result - Prints nothing

<input type=hidden name="Date" value="get_date;">

Result - Prints get_date; instead of actually printing the date

I have also tried many more codes but don't feel like typing them.

What is the correct code to use if I want date to be a hidden field that will be pulled in a hidden manner and printed to the database? Thanks for any help!

Quote Reply
Re: Need code for hidden date field In reply to
Try these lines in sub html_record_form

if ($in{'add_form'}) { $date1 = &get_date;}

<input type=hidden name="Date" value="$date1" size=20 maxlength=25>

You could also set the db_def default for the Date field to &get_date

Date => [(yourfied#), 'date', 20, 20, 1, &get_date, ''],

Then in your html_record_form add the hidden field of:

<input type=hidden name="Date" value="$rec{'Date'}" size=20 maxlength=25>

I didn't test these but I think either will work, at least they should get you going in the right direction.

Cheers!




------------------
Larry "NgtCrwlr" Mingus
www.makeitsimple.com