Recently Viewed...
DNN Modules
SnowCovered Top Sellers

Live Content uses Web 2.0 approach to provide a Rich User Interface and streamlines content presentation by overlaying content on current page. Overlay images, videos, audio, text/html content, flash, dotnetnuke modules, and external content. Experience the demo...

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!

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.

'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

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.

In this day and age, knowing as much detailed information as possible about your customer, prospect or web site user is essential. Thankfully, the new 'Dynamics Forms' module from Data Springs, makes it easier than ever to segment your data collection efforts.

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.

Capture your users attention, enrich your site with multimedia flash, and create and opt in distribution list for your DNN site. These are just a few of the many features the Data Springs Module Collection can provide you.

The Catalyst skins are professionally designed, coded and packaged by a team of DotNetNuke experts. The skins are available in 12 great colours. This skin is easily customisable with our unique DrNuke EasyMod technology. Try our demo!

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 . . .

    |   Register   |   Thursday, December 04, 2008   
Data Springs Product Forums...
Subject: Default Values - IP and Date
Prev Next
You are not authorized to post a reply.

Author Messages
Kelly
Posts:26
going with the flow
going with the flow

06/03/2008 11:26 AM  

I would like to have two textboxes on my form, one with default value of the current IPAddress and another with the current date.

Is this easily possible? I've tried using $(IPAddress) as the default value but that doesn't work.

Thanks!

Chad
Posts:2271
river guide
river guide

06/04/2008 10:27 PM  

Should be... Are you running on 2.6?

Within each field go to Advanced field settings, Default Value, and choose to have a SQL default.

For current date:
Select Cast(GetDate() as nvarchar(20)) as DefaultValue

For IP Address:

Select '$(IPAddress)' as DefaultValue


I just confirmed this working on our development environment with the latest 2.6 release with all know patches and fixes. You can make sure you have this release by checking the patches and hot fixes on Snowcovered as long as you have the 2.6 release.

-Chad

Kelly
Posts:26
going with the flow
going with the flow

06/05/2008 10:52 AM  

Thanks Chad. Worked like a charm!

I sure like your modules, very well done, and great support too!

 

Scott
Posts:1
new to the springs
new to the springs

08/21/2008 2:38 PM  
Any chance this will work with 2.2? I would really like a way to capture the user's IP in a hidden field. Not quite ready to upgrade yet.
Chad
Posts:2271
river guide
river guide

08/21/2008 4:17 PM  
Hi. Unfortunatly this feature was not added until the 2.5 release I don't think.

-Chad
Jody
Posts:11
wading in the water
wading in the water

11/17/2008 7:56 AM  
I tried adding Cast(GetDate() as nvarchar(20)) to my default value for my date field and click update field but when I come back in the default value is gone. Is it because my field is a date field rather than a textbox field?
-Jody
Jody
Posts:11
wading in the water
wading in the water

11/17/2008 8:24 AM  

Forget it!  I just noticed we're on 2.3 and you said it wasn't included until the 2.5 release.  Sorry!

Timothy
Posts:21
going with the flow
going with the flow

11/27/2008 8:38 AM  

Problem with that. 

I entered the following under default value in the advanced section.

Select Cast(GetDate() as nvarchar(20))

 

I first had the option Enter Options chosen.  All it did is display the exact same text.

 

Then did it with the option SQL Driven chosen.  Nothing is displayed in the text box.  In this part it warned me the following.

Note: To enable SQL as a default value for textbox or hidden field types you MUST select only one column from the database and that column must be named DefaultValue. i.e. Select count(*) As DefaultValue from users

Not sure what went wrong. 

Tim

Timothy
Posts:21
going with the flow
going with the flow

11/27/2008 8:46 AM  

I found why it didn't work.

I have the following entered: Select Cast(GetDate() as nvarchar(20))

And I should've had: Select Cast(GetDate() as nvarchar(20)) as DefaultValue

How do get seconds to show up also?

Chad
Posts:2271
river guide
river guide

12/01/2008 4:11 PM  
Hi. Try this:

SELECT CAST(CONVERT(char(30), GETDATE(), 120) AS datetime) as DefaultValue
You are not authorized to post a reply.



ActiveForums 3.7

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