Action Form Notes

Action Form is a module developed by for the DNN Content Management System and Development Platform. The developers at 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

Getting Action Form Data and Reports

Mark Buelsing 0 288 Article rating: No rating

Link to prefill form submissions.

The GUID that you put in the link can be found in the action form reports table, avtActionForm_Reports.

Here is the token to insert in an email to get a link  back to the form with the content inserted:

Here is a sample SQL query to get that data for a submission

SELECT 'ReportEntryId: ' +
      CONVERT(nvarchar(10),ReportEntryId) + ' UserID: ' + 
      CONVERT(nvarchar(10),UserId) + ' submitted on: ' + 
      CONVERT(nvarchar(11),DateSubmitted, 102) + '|' + 

  FROM db_Name.dbo.avtActionForm_Reports
  WHERE ModuleID = 1037
   ORDER BY ReportEntryId desc

This query could be improved by including some data from the form submission, like a name of the person submitting the form. That data is stored in the record in an xml format.

Move Pop-Up Form title Left of X

Mark Buelsing 0 228 Article rating: No rating

Action Form, the pop-up form title shows in the wrong place, to the right of the X to close the form. Use this script to move the text to the left. Put it in the initialization Scripts in the form settings.


$('.modal-header h4').insertBefore($('.modal-header button'));

Push a Grid Selection to a Form

Mark Buelsing 0 245 Article rating: No rating

You can pop up a grid that will display records to choose from and then take the values from the chosen row and put them into the fiels on the form. This is a multiple column drop-down list box.

(Something that I have asked for in the past)

Use the following JS to move the field data from the grid to the form

/* Insert the module id of your FORM in the line below */

var module = '#dnn458root';


/* Use your form field names on the left side, and values from your grid row on the right */

angular.element($(module)).scope().form.fields.FirstName.value = '[FirstName]';

angular.element($(module)).scope().form.fields.LastName.value = '[LastName]';

angular.element($(module)).scope().form.fields.Email.value = '[Email]';

/* Trigger the form to update by applying the field changes */


See a nice video that demonstrates building the popup components here:


HasRole SP

Mark Buelsing 0 0 Article rating: No rating

This script will return true or false after testing that a userid is in a given role or is superuser



    DECLARE @CheckUserID int
    DECLARE @HitCount int = 0

    SET @CheckUserID = '[User:UserID]'
    IF @CheckUserID <> 0 
    --if user is superuser
    SET @HitCount = (SELECT IsSuperUser FROM Users WHERE UserID = @CheckUserID)
     -- if user is administrator
    SET @HitCount = @HitCount + (
    Roles ON UserRoles.RoleID = Roles.RoleID INNER JOIN
    Users ON UserRoles.UserID = Users.UserID
    WHERE Roles.Rolename = 'Administrators' AND Users.UserID = @CheckUserID)

    SELECT CAST(CASE WHEN @HitCount > 0 THEN 'True' ELSE 'False' END AS nvarchar(10)) AS HasRole
    SELECT 'False' AS HasRole

Remove the ActionGrid URL Parameters

Mark Buelsing 0 0 Article rating: No rating

ActionGrid adds parameters to the URL for Page settings even when paging is turned off and not needed. I like those parameters to not be in the URL. This script can be used to clean up the URL. Be careful though, this removes all URL parameters, so if there are parameters needed for something else on the page, don't use this.


setTimeout(function (){ history.pushState(null, null, 'dashboard');}, 5000);

You can put the script in the ActionGrid module settings, Advanced UI Settings, On Init Javascript