Recently Viewed...
To help you navigate to pages you most recently visited, select from the links below.
Product Forums
Sharepoint Forums
Newsletter
Dynamic Forms Demonstrations
Page Tags
DNN Modules
SnowCovered Top Sellers

One stop solution for events calendar and events registration! Demo site available for free trial.

'Relationship Building' and 'Communication' are two essential nuts and bolts for a business to prosper. This module allows you to bridge both of these and easily generate continuous awareness of your web site, products and services. Your prospects and customers will greatly appreciate this featur

Version 5 of the perennial best-selling tool for creating data-based solutions in DNN without custom programming. This version focuses on greater flexibility, expandability, and ease-of-use.

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to add videos in various format and automatically convert them to flv format, you also can add videos from embed code and play them in our integrated flash video player.

The award winning discussion forum and community solution for DotNetNuke is now even better. When you need to build the best community site, you need the best module, Active Forums!

Powerful, Ajax Enabled, Easy to Use. Document Management has never been better. Open-DocumentLibrary allows DotNetNuke users to share and manage documents in a flexible, intelligent way, offering granular control over Folder and Document access.

Gloss is the first ALL COLORS! skin, featuring a powerful XML-based flash and being 100% W3C CSS XHMTL1.0 compliant. Tune it yourself on the fly, changing colors, backgrounds, containers, text color and size, width and more! Brilliant!Available for DNN4 and DNN5

ALL NEW ! - Minimalist includes skin packs in 12 great colors. Each color has Flat, Gradient and Glass versions. Feature rich XML Flash header, perfect for just about any purpose. 9 Different menu options in each skin pack; 3 horizontal menus, 3 vertical menus and 3 all-new Twin level menus . . .

A 16-in-1 dnn module.Powerful yet easy to use. Capable of producing a multitude of functions including:Image rotator/Numeric rotator/ Mp3 player/Wmv player/ Flash video player /YouTube video player/Multimedia player / Text-to-speech podcast / Flipping book player/Banner topic player/Silverlight albu

Ultra Media Gallery is the most popular photo gallery and media gallery solution for DotNetNuke, UMG offers 10 different flash player to browse your gallery with completely different user interface experience.

    |   Register   |   Friday, January 09, 2009   
Data Springs Product Forums...
Subject: Date Time default to current data time
Prev Next
You are not authorized to post a reply.

Author Messages
John
Posts:5
skipping stones
skipping stones

02/15/2008 12:09 PM  

I am brand new to DNN and Dynamic Forms. I had a need to display on screen the current date and time for a new form that was being opened. I had discovered the "Advanced Field Options -> Default Value" field, but was having a problem getting my mind around what it needed to give me what I needed. Here is Chad's solution:

Try setting up a hidden field... Actually make it a textbox field to make sure it's working first, or a textbox field that is read only and then once you get it working change it to a hidden field. Choose to use a SQL Default which is available only for textbox and hidden fields. Within this field try some SQL such as this:

 

Select GetDate() As DefaultValue

 

Also, if you later query the data I do believe there is already a form date/response time column in the DynamicForms_QuestionResponse table.

For my purposes I did not need to hide the field, but the "read only" attribute was important. It is also true that there is a field in the database table which captures the date and  time of the submit.

I found that if I only wanted the date that the following would work as expected:

Select CONVERT(VARCHAR,getdate(),101) As DefaultValue

Finally, here's SQL code which you can run in Query Analyzer or SQL Server Management Studio to see the effect of your submit:

SELECT     DynamicQuestionResponseID, DynamicQuestionID, Response, UserID, SortOrder, InActive, ResponseDateTime, UniqueResponseID
FROM         dnn_DynamicForms_QuestionResponse
WHERE     (ResponseDateTime =
                          (SELECT     MAX(ResponseDateTime) AS Expr1
                            FROM          dnn_DynamicForms_QuestionResponse AS dnn_DynamicForms_QuestionResponse_1))

Hope this helps someone else!

You are not authorized to post a reply.
Forums > Product Discussion - DotNetNuke Modules > Dynamic Forms > Date Time default to current data time



ActiveForums 3.7

Copyright 2005 - 2009 by Data Springs, Inc.
Terms Of Use | Privacy Statement