Gossamer Forum
Home : Products : DBMan : Installation :

get date in form

Quote Reply
get date in form
I want to use a new form to put information. What is the exact html i have to put to automatically the date in the field dag_invoer

I thougt it was

<input type="text" name="$rec{'Dag_invoer'} value="&get_date">

But it is'nt working, why?
Thanks
Quote Reply
Re: get date in form In reply to
Because you can't use a subroutine as the value in a form field.

What you can do is set &get_date as the default value in your .cfg file. Then make your form field definition:

<input type="text" name="Dag_invoer" value="$rec{'Dag_invoer'}">

Be aware that if you have it as a text field, the user can change the date. If you don't want them to be able to change the date, use

<input type="hidden"...



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