Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Hidden Date Field Issue Not Updating Properly

Hidden Date Field Issue Not Updating Properly

Hidden Date Field Issue Not Updating Properly

I have a form that emails me and updates a SQL database. ALL fields work except I cannot get the hidden field for a date to work. In the Value area Dreamweaver I have <%=Date()%> (this is the value I typed into the white box area). After I click Submit, my database field value for that field is "<%=Date()%>" and not the actual date and the email I receive is showing the Field Name but blank as the value. The form is an ASP page. Why is this so hard to get working? I don't have any other issue with any other field, including all my other hidden fields.

RE: Hidden Date Field Issue Not Updating Properly

There is no write command. I am assuming you missed something like this.


response.write("Hello World!")

but this is all conjecture. seeing the actual code is much more helpful.

Darryn Cooke
www.darryncooke.com | Marketing and Creative Services

RE: Hidden Date Field Issue Not Updating Properly

All my other hidden fields work and show in my emails and databases. I know that there is no write command. I'm using HotDreamweaver's ASP To Database's code to do that.

This field works (along with 8 other hidden ones just like it)

<input name="Location" type="hidden" id="Location" value="TORONTO" />

This one does not:

<input name="Date" type="hidden" id="Date" value="<%=Date()%>"/>

My email for Date is blank and the database shows "<%=Date()%>" as the value. No dates.

I don't have issues with the form or sending form data. I only have an issue capturing a date.

RE: Hidden Date Field Issue Not Updating Properly

So you are trying to write in today's date?

I don't know much about ASP but there is no write command there. Assuming your page is an ASP page your server will parse whats between the %'s to just be garbage unless there is a previous function that stipulates that "=Date()" SHOULD be something. You need something like this



this will write the date (you can change the formatting of the date with se the examples here http://www.w3schools.com/asp/asp_examples.asp)

As far as your script is concerned the value for date IS "<%=Date()%>". You have not given ASP any command to run. It works like this for all scripting languages (front or back end) you have to specify what you want the output to be.

Darryn Cooke
www.darryncooke.com | Marketing and Creative Services

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close