• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Edit
Show / Hide Table of Contents

Creating web forms using special templates in SuperOffice

Audience:
settings
•
Environment: onsite
Some tooltip text!
• 2 minutes to read
 • 2 minutes to read
  1. Create a template for the web form under the templates directory in SuperOffice.

    Example: C:\SuperOffice\Customer Service\templates\special\mytemplate.html

  2. Access the template from the www browser using the following address .../scripts/customer.exe?action=spec...

  3. Edit the content of the special template

  4. Create a template called ok.html in the same location. This will be called when the customer press the Post button.

Example

<html>
<form method="post" enctype="multipart/form-data" action="%Program%?action=specialForm">

<input type="hidden" name="ticket.title" value="Request from special form">
<input type="hidden" name="ticket.category" value="1">
<input type="hidden" name="message.author" value="Web form1">
<input type="hidden" name="message.body" value="">

When posted <input type="text" name="whenposted" size="18" value="%datetimenow%">
<br>
First name <input type="text" name="customer.firstname" size="45" value="">
<br>
Last Name <input type="text" name="customer.lastname" size="45" value="">
<br>
Email <input type="text" name="customer.email" size="45" value="">
<br>
Message <input type="text" name="message" size="45" value="">

<input type="hidden" name="message.alterbody" 
       value="This is a example web form created at %%whenposted%% by %%customer.firstname%% %%customer.lastname%% with email address %%customer.email%% Message from this person: %%message%%">

<input type="hidden" name="oktemplate" value="special/ok.html">

<input type="submit" name="ok" value="Post">
</form>
</html>

Description of %-tags:

%datetimenow% inserts the current date into the HTML page

%program% inserts the program location, for example, /scripts/customer

%-tags in message.alterbody:

%%customer.firstname%% inserts the form value customer.firstname into the message body %%customer.email%% inserts the form value customer.email into the message body

%%foobar%% inserts the form value foobar into the message body

To create a request in SuperOffice, set the following values:

"ticket.title" title of request
"ticket.category" which category to insert the ticket to (number, not name)
"message.body" body of the message in request (not used if message.alterbody exists)
"message.alterbody" if you wish to insert values from form in message use this also, remember to use an empty message.body
"message.author" author of the message

To connect a request to a user, set the following values:

"customer.firstname"
or
"customer.email"
optional
"customer.lastname"
"customer.phone"
"customer.cellphone"
"customer.note"
"customer.username"
"customer.password"
"customer.extra.xxx" where xxx is an extra-field on the customer table
In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top