Enabled (HTML5/JavaScript)

The Enabled (HTML5/JavaScript) generates a simple HTML snippet to your website, so we recommend it, because this option is easy and handy.

Moreover, embedded form will be automatically updated reflecting changes in your database setup. All built-in TeamDesk functionality such as form behaviors, dynamic column calculationsreference columns and validation rules is supported from the ground up.

When you generate a web-to-record form and set the Enabled (HTML5/JavaScript) option, you can see the following form:

The options are described below:

Option

Description

Impersonate as

To design the form in a simple way, you should choose a form adjusted for an existing user. Just select the user name in the dropdown. As a result, the web-to-record form will look and work like the form displayed to the specified user. If you need a unique form, you can create a new user, adjust a form behavior for this user and select the user name in the dropdown.

Button Label

Here you can assign a label to the button that will submit the form data to the database.

After Form Submit

In case you select the Display Message option, the text written in the Message field will be shown, when the button is clicked and the data is submitted.

If the Redirect to URL option is set, you are able to specify the URL referring to a web-page or other web-to-record form when the button is clicked and the data is submitted.

Message

Write the message being displayed as a confirmation message.


After you save the changes, the HTML code will be generated.

Declarative passing of URL parameters

TeamDesk supports declarative passing of the URL parameters from browser navigation bar into web-to-record form. Therefore you can simply add the following to the end of your web from url:

fid_<column-id>={{url:<parameter-name>}}

Where column-id is an identifier of the column. You can find it in browser URL while viewing column properties in setup section;

<parameter-name> is a URL parameter to take the value from.

For example: You created the “Feedback” table in your database. This table includes two reference columns: “WorshopID” referring to the Workshops table and the “Email” column referring to the Participants table.

You want to collect workshop feedback of a participant. Such feedback should be collected via web-to-record form and registered as the “Feedback” table record. The web-to-record form is embedded into your website page. Let’s name this page Feedback page.

The idea is to send each participants the Feedback page URL comprising WorkshopID and Email of a participant. As the result, when a participant will click on the received URL, these values (WorkshopID and Email) will be inserted into the corresponding fields of the Feedback form automatically.

For instance, the following URL

will redirect a participant to this Feedback form:

As you can see, the values kept in the URL are inserted into the “Email” field and into the “WorkshopID” field respectively.

Below is the modified web-to-record form script, that was used in the example:

Next: Enabled (Pure HTML)