Client Visit Rating

You can use this form to rate client visits.

The form is linked to a Company, and you can add a new Form with this template from any Company in the Contacts database.

The form has fields to enter the Time In and Out of a visit, and combo boxes to enter rating information. In this sample, the quality of visit is entered either with a combo box or with a Question field. You can customize the template from the Forms app.

You can also create custom reports in the Forms app, with the appropriate script in the Options / Custom Dashboard tab. The report appears in the Forms / Dashboard section in your web account.

Download and Import the sample template to the Templates section of the Forms app in your web account:

Client Visit Rating

Duplicate Form with new date in xx days

In this template, the data from a submitted Form is copied over to a new Form with the same template and a new date in 7 days.

The Javascript code entered in the Execute on Submit field in the Form template Properties is as follows:

var form2 = {};
form2.templateid = form.templateid;
form2.status = 0;
form2.name = Forms.getNewName(form2.templateid);
form2.owner = User.getName();
form2.date = Date.today(7);
form2.geo = Settings.getLocation();
form2.address = Settings.getAddress(form.geo);
form2.linkedtable = form.linkedtable;
form2.linkedid = form.linkedid;

var values2 = {};
values2.F1 = F1;
values2.F2 = F2;
values2.F3 = F3;
form2.value = JSON.stringify(values2);

Query.insert(“Forms.forms”, form2);

return 1;

Change the value 7 in Date.today(7) to the number of days from Today you want for the new form date.
Change the values F1, F2, etc.. to the field IDs in your own template.

Download and Import the sample template to the Templates section of the Forms app in your web account:

Duplicate Form with new date in 7 days

Copy Submitted Data to New Form

In this template, the data from a submitted Form is copied over to a new Form with a different template (Target Form).

The Javascript code entered in the Execute on Submit field in the Form template Properties is as follows:

var form2 = {};
var target = Query.select(“Forms.templates”, “id”, “name=’Target Form'”);
if (target == null) return 1;
form2.templateid = target[0].id;
form2.status = 0;
form2.name = Forms.getNewName(form2.templateid);
form2.owner = User.getName();
form2.date = Date.now();
form2.geo = Settings.getLocation();
form2.address = Settings.getAddress(form.geo);
form2.linkedtable = form.linkedtable;
form2.linkedid = form.linkedid;

var values2 = {};
values2.F1 = F1;
values2.F2 = F2;
values2.F3 = F3;

form2.value = JSON.stringify(values2);
Query.insert(“Forms.forms”, form2);
return 1;

Download and Import the two sample templates to the Templates section of the Forms app in your web account:

Copy Submitted Data to New Form (Source)
Target Form

Validate Contact Email on Submission

This template uses a Form to enter a Contact email. When submitting the form, it tests if the contact already exists in Upvise by looking up the Contact email. If it exists, a warning alert is displayed. If not, the contact is created in Upvise with the input email.

Custom Fields: the Form also includes an input field which is used to update a Custom Field pre-defined for the Contact.

Public Form URL: The form can be made public by setting the Enable Public option in the Sharing tab of the Form template. A public URL is made available, where external users can fill in and submit the form. Submitted form values are posted into the Upvise Forms database.

The Javascript code entered in the Execute on Submit field in the Form template Properties is as follows:

var email = F1.trim().toLowerCase();
var level = F2;
var count = Query.count(“Contacts.contacts”, “email=” + esc(email));
if (count > 0) App.alert(‘Email already exists!’);
else {
var id = Query.insert(“Contacts.contacts”, {name:email, email:email, creationdate: Date.now() });
CustomFields.values = CustomFields.loadValues();
CustomFields._update(“Contacts.contacts”, id, “F3”, level);
App.alert(‘Contact inserted!’);
}

return 1;

Note: a Custom Field must have been created for the Contacts app (in the web account Settings menu). In this example, the Custom Field has the ID “F3”, and it is a multiselect combo box type of field. The Options set in the Contact Custom Field must match the Form field (F2) Option values.

Download and Import the sample to the Templates section of the Forms app in your web account:

Validate Contact Email Exists

Automatic Task creation on Form submission

When a Form is submitted, you can automatically create a new task in Upvise, using values input in the form.

To do this, enter the appropriate Javascript code in the Execute on Submit field in the Form template Properties.

Example:

var values = {};
values.duedate = F1;
values.name = F2;
values.contactid = F3;
values.owner = User.getName();
values.startdate = Date.now();
var id = Query.insert("Tasks.tasks", values);
App.alert("New Task Created!");
return 1;

Download and Import the sample to the Templates section of the Forms app in your web account:

Automatic Task Creation

Online Lead Collection using Public Forms

You can use the Forms app to collect leads directly from your web site.

Here’s how to in 3 simple steps:

1. Goto the Forms web app Templates section and Import this Form Template into your account:

Online Lead Collection

2. Open the template and click on the Sharing tab. Then click Enable Public.

3. Link from your web site to the Public URL.

Note that you can customize the form template with your own fields, titles, etc…

Each time a visitor to your site fills in the Online Lead Collection form and clicks on Submit Form, this will create a new form which appears in your Upvise account, in the Forms app, in the Leads group.

You can Export all collected forms as a CSV file for use in a third-party app.