Menu

Action Form Notes

Action Form is a module developed by DNNSharp.com for the DNN Content Management System and Development Platform. The developers at LetItShine.biz have used the Action Form module for countless projects and solutions for a number of years. The following is an modest collection of notes that we have started to record about techniques to take advantage of the strengths of this module. We record this here not to become a secondary help system for Action Form users or DNNSharp. But if you can find something here that helps you, that makes us happy too.

Return to the list

Delay Actions

Mark Buelsing 0 2433 Article rating: No rating
Add a ‘Run SQL Query’ action with the following query, which will wait for 5 seconds:

 WAITFOR DELAY '00:00:05';

Standard Tokens in Action Form

Mark Buelsing 0 7303 Article rating: No rating
  • Utility Tokens
    • [_ReportKey] - unique ID that identifies the current submission. This also powers edit functionality in Action Form. Whenever a entry parameter is present in query string, Action Form tries to match the associated report entry and load it into the form.
    • [_Referrer] - holds the URL from which the user arrived to the form
    • [_UserIp] - holds the IP of the user
    • [_FormUrl] - the URL where the form lives
    • [_FormUrlRelative] - same as above, only it’s a relative URL
    • [_EditUrl] - is the URL to edit current submission at a later time
    • [_IsNew] - true when the form is submitted for the first time
    • [_IsEdit]- true when the form is edited (for example using the [_EditUrl] token or Action Grid).
  • These tokens also work
    • [Module:ModuleId] - The Module ID

QueryString for Action Form

[GET:SomeParam=21]

[QueryString:SomeParam]

[QueryString:SomeParam=ValueifParamEmpty]

QueryString for Action Grid

[$ID=1]   (This syntax only works for ActionGrid)

Also alternative syntax for Querystring tokens: [
QueryString:PID=-1] 
introduced for Action Grid, the -1 is needed to allow QctionGrid to return the columnnames first

  • Read More to see more tokens

QueryString parameters with Default Values

Mark Buelsing 0 2417 Article rating: No rating

 

You can use [$id] instead of [QueryString:id], for example in a grid’s data source you can set as statement:

select * from Users where UserID=[$ID=1] 

If I access a page with no id in query string, then the -1 id will be taken as default and no value will be returned because there is no user with -1 id.

* I have seen it written that MyTokens was necessary in order to use this notation, however it worked for me without MyTokens.

___

The following might work only when MyTokens is installed

Default values are supplied when the token is invoked, this method works for any token and it will override the default value that is specified for custom tokens when they are defined.

The syntax is: [MyNamespace:MyToken = My text value that is displayed if there is data returned by the token]

For example, [GET:SomeParam=21] will return 21 if a parameter with name SomeParam doesn’t exist in Query String.

If you want to hide something if the querystring parameter does not exist, then it looks like this:  [QueryString:WEID=0]!="0"

Send more columns of data through the Multiple Choice Dropdown

Action Form. Pack more data into your Multiple Choice Dropdown, unpack it when an option is chosen

Mark Buelsing 0 3987 Article rating: No rating

The multiple choice field has the value and the label. That's two columns of data on each row. When you really need more than two columns for each row, you can have it with some creative SQL and Javascript.

RSS
12345678