Adding a Custom Form

Advanced Users Only

You can create custom forms with custom actions on your website. We have prebuilt your site with the following forms:

  • Contact Form

  • Registration Form

  • Create Account Form

  • Suggested Project Form

If you need a form outside of that, feel free to create one yourself. Add a module called "Action Form" and build your form.

Using our API to send emails

In your Submit Button, it is highly suggested to use our API to send an email. This allows branding and well formatted emails to be sent.

To do so, open the Submit button and under On Click Handler, click Import and paste the following code:

{
    "Title": "Server Request",
    "ActionType": "PostData",
    "Description": null,
    "Condition": null,
    "Parameters": {
        "InputParameters": "",
        "URL": "https://app.districttoolbox.com/DesktopModules/DnnSharp/DnnApiEndpoint/Api.ashx?method=LOC_EmailList-v2",
        "UrlTokenContext": {
            "Expression": "",
            "Value": "Url",
            "IsExpression": false,
            "Parameters": {}
        },
        "UseSSL": "",
        "Timeout": "",
        "HttpMethod": {
            "Expression": "",
            "Value": "POST",
            "IsExpression": false,
            "Parameters": {}
        },
        "Data": "Portal=[Tab:FullUrl]\nList=CustomForm\nSubject=SUBJECT HERE\nMessage=MESSAGE HERE\nEmail=[Email]\napiKey=o4ILRfLLJ8P2bVbfSYqABPNrTLGoil1Q",
        "DoNotEscapeTokens": "",
        "DisableReferer": "",
        "Headers": "",
        "UseDNNProxySettings": "",
        "AddCurrentCookies": "",
        "OutputParameters": "",
        "CookieContainerToken": "",
        "OutputTokenName": "",
        "OutputHeaders": "",
        "IgnoreErrors": "",
        "Events": "",
        "OnError": []
    }
}

Next, update the values under Data for "Subject" and "Message" to include content from your form. Content follows a token structure, so if you have a Text Box with a title of "First Name", the ID would be "FirstName". To add the submitted value into the Content of the email, include the following:

<p>First Name: [FirstName]</p>

The token [FirstName] will then be replaced upon submisison.

You can find more information here about our Action Form:

Last updated