Extensions‎ > ‎

My Action Form Uniqueizer

MyActionFormsUniqueizer is an add-in for DNNSharp’s ActionForm DNN module and an accompanying DNN module to administer the generated unique data. 

Log into your DNN installation as Administrator or SuperUser and install MyActionFormsUniqueizer as you would any other DNN module. In your list of installed modules, you will get an entry called MyActionFormsUniqueizer and inside your ActionForm you will get another Action.


If you want to do a sweepstake on your DNN website using ActionForm you will want to keep participants from submitting multiple times. This is where MyActionFormsUniqueizer comes in.

A simple Sweepstake

Let’s try it out. Add an ActionForm module to a page on your site.
Give your module a meaningful title, here “Sweepstake”. Select “Manage Form” from the module popup. And select for instance the “Contact Form” template, or any other predefined or custom template, that seems appropriate.

Now you add a field for the question:

I used a “Multiple Choice (with Radio boxes)” type of field. And write a question and some answers. Make the field “Reqiured” and move it to the top of all the fields.
Select “Layout Mode” and drag and drop the field. Now save your changes. Now add the validator that prevents users from submitting multiple times. 

Back in “Edit Mode” expand the “SendNow” button and add a new action.

Under “Validate” add “Only unique Users” and move it to the top, so that it is the first of the actions that are triggered by “SendNow”, because you will want to prevent other actions from running, when the user submits a second time.

The “Only unique Users” action needs two fields to be filled out. First you have to select which field contains the e-mail address, that the action uses to identify the user. And second you write the message that is displayed, when the user is submitting a second time.

The final ActionForm looks like this:

The Admin Module

The admin module is named “MyActionFormsUniqueizer” and you can add it to the page like any other module.

The module should not be visible to the sites users but only for administrators. So you either put it on a hidden page or set the permissions of the module to be only displayed for administrators. The module can be used to administrate all instances of ActionForm with MyActionFormsUniqueizer add-in.

In the upper left corner of the module (first red ring) is a dropdown, where the module-id and the title of a given ActionForm module is displayed, in this case “Sweepstake”. The second red ring denotes a particular user that has submitted his answer to the sweepstake once. If he tries it a second time, the form looks like this:

The users e-mail address is found in the table and therefore the message that you have entered gets displayed and any subsequent action is not performed.