Skip to main content
MindTouch Success Center

Contact Support form (MT4)

This allows users to send a support request via an email to what ever endpoint you specify. To create a new contact support form go to your site, and create a new page, for this example will will create the form in a new page yoursitename/$ContactSupportFormDirectory

  1. Insert a new DekiScript Block
  2. Copy & paste in the boiler plate below
    var args = __request.args;
    <div class="mt-support-email">
        <form class="mt-support-form ui-dform-form">
            <fieldset class="ui-dform-fieldset">
                <div class="mt-field">
                    <label class="ui-dform-label" for="firstname"> "First name:" </>
                    <input class="mt-email-field field" type="text" name="firstname" maxlength="100" />
                <div class="mt-field clear">
                    <label class="ui-dform-label" for="lastname"> "Last name:" </>
                    <input class="mt-email-field field" type="text" name="lastname" maxlength="100" />
                if(user.anonymous) {
                    <div class="mt-field clear">
                        <label class="ui-dform-label" for="email"> "Email" </>
                        <span class="mt-required">'(Required)'</span>
                        <input class="mt-email-field required field" type="text" name="_email" maxlength="300" />              
                } else {
                    <input type="hidden" class="mt-email-field field" name="_email" value=( />
                <div class="mt-field clear">
                    <label class="ui-dform-label" for="subject"> "Subject" </>
                    <span class="mt-required">'(Required)'</span>
                    <input class="mt-email-field required field full" type="text" name="subject" maxlength="300" value=(#args['query'] ? args['query'] : '') />
                <div class="mt-field clear full">
                    <label class="ui-dform-label" for="description"> "Description" </>
                    <textarea class="mt-email-field field" placeholder=("Please describe your issue.") name="description"></>
                <input type="hidden" class="mt-email-field field" name="_search" value=(#args['query'] ? args['query'] : '') />                  
                <input type="hidden" class="mt-email-field field" name="_path" value=(#args['path'] ? args['path'] : '/') />
                template('MindTouch/Controls/WorkflowSubmitIssueButton', {button: 'Submit'});           
  3. Paste the following into a CSS block. This will hide any non essential controls. This step is optional.​
    .modified, .tags, #related, .product-menu, .article-menu, .dw-hierarchy, .breadcrumbs, div.pageinfo, div.widget, .mt-content-container.widget,{ 
        display: none !important; 
  4.  This will create a basic form that will output an input element for Firstname, Lastname, Email(if user is anonymous), Subject and Description.
  5. The boiler plate also creates two required hidden fields that is used to log data. The two fields are "_search" and "_path". These are already mapped out to the correct values.
  6. The last line in the form, is the template call which accepts a button parameter where you can specify the text or mark up to be displayed in a button that is generated for you.
  7. You can customize the form even further by adding or removing fields that suit your needs (except for _path and _search which are required).

Form Template

The line: 

template('MindTouch/Controls/WorkflowSubmitIssueButton', {button: 'FORMNAME'});

calls the form builder template. What this basically does, is take your form that you created on the page, and add the logic necessary for Article Request. You can change the name of the button by replace FORMNAME.

  • Was this article helpful?