Skip to content

11.4 Content form design

When it comes to the visual design of your forms, you have all the options available to you with websites. You define the design with CSS and HTML and are completely flexible here. In order for the forms to be able to transfer data to the database or read data from it, certain values must be set and database columns (profile fields) linked.

The following sections explain how to do this.

11.4.1 Form basics

There are basically no limits to the structure of the content. But a few things are good to know:

  • Open the form part in HTML with the following expression:

  • If you want to save data in a recipient profile, you must tell the OpenEMM in the background which CompanyID your client is. So that this cannot be read in plain text, there is a so-called CTOKEN for this, which is an encrypted value for the ComanyID. You can find the CTOKEN e.g. in the URLs of existing forms. In the form you can store this with the following expression - instead of xxxxxx you insert your CTOKEN:

  • If you want to call up another OpenEMM form directly after submitting the form, use the following expression and replace the placeholder form_name with the name of the desired form in agnFN:

  • If it is a registration form, you have to give the OpenEMM more information. Firstly, for which mailing list (agnMAILINGLIST) the recipient is to be subscribed, which mail format (mailtype) he/she is to receive and which status (agnSUBSCRIBE) he/she is to receive. You can find the ID of your mailing list in the overview of mailing lists and insert it instead of xxxxx. The mail format is usually HTML (= 1) and the recipient status should be set to active (= 1) after confirmation:

  • You can embed other fields that are to be filled in the background in the same way by entering the field name in the database under name and storing the desired contents for value. Example:

  • Form fields that are to be filled by the caller itself could look like this:

    It is important that the name parameter uses the field name from the OpenEMM database, in this example FIRSTNAME. In this way, the input field of the form is assigned to the corresponding field in the recipient database.

  • Date fields must be divided into three individual input fields for day, month, and year. The field names are always according to the following scheme: FIELDNAME_DAY_DATE, FIELDNAME_MONTH_DATE, FIELDNAME_YEAR_DATE. Example of a date field birthday:

Day:
Month:
Year:

11.4.2 Drop-down list instead of entry field

Some data is saved in the profile database as a reference number, for instance gender or mail format. It is impossible to ask a subscriber to enter the relevant numerical data on registration. This would not only cause many errors, but will also prompt some people to enter invalid data on purpose. It is much more elegant to offer subscribers a drop-down list for parameter selection - with speaking entries. To do this, the tags

In the first line, the

When outputting an existing profile, the correct point must also be marked in a selection list. To do this, you must insert the attribute selected in the HTML code in the corresponding tag. The same applies to a checkbox, where the attribute checked creates a check mark. You use script commands to insert the attributes in the correct place, depending on the recipient profile. The example for displaying the mail format in a selection list looks like this:

Mail-Format:

The list option selected in the browser window must have the selected attribute against its value. First, the #if query checks whether or not the value stored in the database is plausible for the list option concerned. The $customerData.MAILTYPE code calls up the value stored in the profile. MAILTYPE is the name of the field where OpenEMM stores the mail type (text, HTML or Offline-HTML) selected by the recipient. If the value selected and the value found are identical, the script command inserts the text from the ‘if’ query immediately before #end into the HTML code. For instance,