Email Manager - ADDITIONAL RESOURCES

HOME

Setting up a Form

To submit a form to EM, you need to modify the <form> tag in the HTML code of your form. It should look like this:

<form action="{gdcform}" method="POST">

You may use either a "POST" or a "GET" as the method. The {gdcform} in the action parameter is what submits the form to EM.Next, you will need to add a hidden field into your form to define which of your lists the data is to be added to. The hidden field should look like this:

<input type="hidden" name="{addlist:listname}">

Where listname is the name of the list you are adding data to. The {addlist} tag can be inserted by clicking on the Insert icon ()in the tool bar. In the pop-up window, select the "Lists and Fields" tab. To expand a list category, click it. Then select your list and click "Insert Selected List".

You can also manually type in a new list name and that list will be created when you save your template. In this case, you will need to define a Primary Key with a {setfield} command. See the next section for details. You can use some additional parameters with {addlist} as follows:

{addlist:listname,noupdate} - will not allow the form to update records in your list, only add new ones.

{addlist:listname,nocreate} - will not allow the form to add new records to your list, only update existing records.

Now, we want our form data to be saved into specific fields in our database, so we must let EM know what goes where. To do this, modify the <input> tags in your form as follows:

<input name="{setfield:fieldname}">

Where fieldname is the name of the data field in your database that you want the selected data to be written into. You can find the field names in the template editor by clicking on the Insert icon in the tool bar. In the pop-up window, select the "Lists and Fields" tab. To expand a list category, click it. Then select your list and you will see a list of fields in the "Select Field to Insert " window. Select the appropriate field and click "Insert Selected Field". Do this for all inputs types, including check boxes, radio buttons, and selects (drop-down menus).

You can manually type in new field names and those fields will be created when you save your form. Use the following optional parameter when creating new fields:

{setfield:fieldname,pk} - sets this field as the Primary Key for a new list.

     
© Alterian. All Rights Reserved. | Privacy Policy | Legal Notice