Bridgeline Digital Logo
Menu

Create a Form Content Item

The Form content type is used to create forms that can be used to submit information directly to a Salesforce object from your site.

We recommend that you plan your form before you begin building it in OrchestraCMS. This minimizes the modifications you need to make as you are building it. Forms are structured in a table. By default, the table has two columns and six rows, but you can modify this layout as necessary.

Modify the layout of the form table

  • Do one or more of the following:
    • To add a row to the table, right-click in a cell and select Insert Row Above or Insert Row Below.
    • To add a column to the table, right-click in a cell and select Insert Column Before (to the left) or Insert Column After (to the right).
    • To merge two or more cells, click and drag to select the cells, then right-click and select Merge.
    • To split previously merged cells to the original format, right-click in the merged cell and select Split.
    • To delete a row, right-click in a cell in the row and select Delete Row.
    • To delete a column, right-click in a cell in the column and select Delete Column.
    • To edit cell properties, right-click in the cell, select Edit Cell Properties, do one or more of the following, and then click Save:
      • In the Cell Width box, enter the width of the cell in pixels, and optionally, click Apply to Column to set the width as a column property instead of a cell property.
      • In the Cell Height box, enter the height of the cell in pixels, and optionally, click Apply to Row to set the height as a row property instead of a cell property.  
      • In the Cell Padding box, enter the space between the contents of the cell and the cell border in pixels.
      • From the Align list, select the appropriate horizontal alignment for the contents of the cell.
      • From the Vertical Align list, select the appropriate vertical alignment for the contents of the cell.
    • To edit table properties, right-click in any cell, select Edit Table Properties, do one or more of the following, and then click Save:
      • In the Default Cell Width box, enter the default cell width in pixels.
      • In the Default Cell Height box, enter the default cell height in pixels.
      • In the Default Cell Padding box, enter the default amount of space between cell contents and cell borders in pixels.
      • In the Rows box, enter the number of rows in the table. New rows are added to the bottom of the table.
      • In the Columns box, enter the number of columns in the table. New columns are added to the right of the last column.

Set Visibility of fields on OrchestraCMS forms

For profiles

  1. For each profile, in Salesforce Setup, under Manage Users, click Profiles, and then click the relevant profile name.
  2. Under Field-Level Security, click View beside the Object you need to change.
  3. Click Edit.
  4. Under Visible, select the check box for each appropriate field.
  5. Click Save.

For Public Access Settings

  1. In Salesforce setup, under App Setup, expand Develop.
  2. Under Sites, click Site Label and then Public Access Settings.
  3. Under Field-Level Security, click the View link beside the Object you need to change.
  4. Click Edit.
  5. Under Visible, select the check box for each appropriate field.
  6. Click Save.

A form contains Salesforce fields and other form elements, such as text labels, a submit button, a reset button, a save button, and a reCAPTCHA element that protects your form from robot submissions. Each Salesforce field added to your form becomes a text box, check box, list, etc., that can be used to enter information.

Most often, a form is created to populate Salesforce fields from a single object. For example, a form could gather lead information using only fields from the Salesforce Lead object. However, you can create a form using fields from multiple objects. Typically, it only makes sense to create a multiple-object form if the objects have a lookup relationship. For example, the Contact object has a lookup to the Account object to represent the relationship between a contact and his or her associated organization. You could make a form that includes fields from both the Contact and Account objects. If fields from two different Salesforce objects are used and they do not have a lookup relationship, a submitted form creates unrelated records in each of the objects.

Keep in mind the following tips when choosing Salesforce fields for your form:

  • Be aware of the required fields for an object (indicated with a check mark). Any required fields that are writable should be included in the form. Fields such as IDs and timestamps that are generated automatically are not writable and do not need to be included in the form.
  • Use hidden fields to automatically populate information that is not provided by the users who submit the form. For example, you could associate a lead form with a specific campaign.
  • If you are using fields from multiple objects, verify that the objects have a lookup relationship or that a lookup relationship is not required for your purpose. If you are using fields from multiple objects, the lookup field that defines the relationship between the objects does not have to be included in the form for the relationship to be recognized.

Add Salesforce fields to your form

  1. Double-click to add field. In the content editor, select an object from the Select Object list that contains the Salesforce fields you want to add to the form, and then click Add Field. Repeat as necessary to add other Salesforce objects. The objects you add become expandable lists of fields that you can add to the form.
    • Click the dots on the left end of a field and drag it to the appropriate table cell, or if it is a hidden field, to the Drop Hidden Fields Here area.
  2. Click to open the Add Field dialog box.
  3. In the Add Field dialog, do one or more of the following, and then click Save:
    • Click to select the Required check box if you want the field to always be filled out (fields that are required by the Salesforce object always have this option selected).
    • Click to select the Auto DeDuplicate Field check box if you want the field to be used to check for matching Salesforce records. A form submission is only deemed to be a duplicate if all fields that have Auto DeDuplicate enabled match a single existing record. If a matching record is found in Salesforce and a page has been selected for the Duplicate Page field in the form content editor, the user is directed to that page.
    • Click to select the Query Parameter Field check box if the Salesforce field should be preloaded with the value specified by a URL query parameter. When you select this check box, a Parameter Name text box appears where you enter the name of the parameter. Any field designated as a query parameter field must not be empty when the user submits the form; otherwise, no Salesforce records will be modified and the Invalid URL Page associated with the form will be displayed. If a query parameter field is hidden, the page’s URL query string must be used to preload its value. The query string must include the parameter and have a non-empty value; otherwise, the form submission will fail. Query parameter fields are typically hidden form fields, but they can be used to preload values for regular fields as well. With query parameter fields, you can create links with different query strings that point to the very same page and form, but the form will be preloaded with customized field values to suit the purpose of each link.
    • Click to select the Output Parameter Field check box if the field should be passed as a parameter to the confirmation page. For example, if you want your confirmation page to show the user the information they submitted, you would first need each of the fields to be output parameter fields. The developer who creates your confirmation page could then configure the page to display the user-submitted information.
    • Beside Default Value, enter or select a default value for the field. For fields displayed in the form, the end user sees the default value populated in the field on the form page, but they are able to change it. For hidden fields, the default value is always used to populate the field when a form is submitted.
    • In the Width box, enter the width of the field in pixels. The width of the field should be smaller than the width of the table cell it is in.

Add text labels to your form

  1. Double-click to add field. In the content editor, click Form Elements to expand the list of elements.
  2. Click Add Element on the right of the Text bar.
  3. In the Add Field dialog, enter the text that you want for the label and then click Save. For example, use “Last name” to label a field that stores the user’s last name. The Add Field dialog contains a limited version of the rich text editor, which you can use to format the text label.

Add submit, reset, and save buttons to your form

  1. In the content editor, click Form Elements to expand the list of elements.
  2. Click the dots on the left end of one of the following button elements and drag it to the appropriate table cell:
    • Submit Button creates a button for the user to submit the form.
    • Reset Button creates a button to reset the form fields to their original state.
    • Save Button creates a button to save the contents of the form field for the user to return to it at a later time.
  3. In the Add Field dialog, enter text to appear on the button in the Button Text box and then click Save (e.g., “Submit” or “Send Form” for a submit button).

Add reCAPTCHA to your form

  1. In the content editor, click Form Elements to expand the list of elements.
  2. Click the dots on the left end of the reCAPTCHA bar and drag it to the appropriate table cell.
  3. In Salesforce, add the following URL to your Remote Site Settings to allow reCAPTCHA to work on your site: http://www.google.com/recaptcha/api/

There are four optional pages that can be associated with a form:

  • A confirmation page that the user goes to after successfully submitting a form. If a confirmation page is not provided, the user stays on the form page after submitting the form.
  • A duplicate submission page that the user is directed to if they have submitted information that is already stored in Salesforce. If a duplicate page is not provided, the user stays on the form page after submitting the form.
  • An invalid URL page that the user is directed to if they submit a form that contains a query parameter field that has been left empty. In this case, if an invalid URL page has not been provided, the form submission fails and the user stays on the same page.
  • A save form email template that contains a link to the saved form that is emailed to the user. The content of the email template must contain the string {:SavedFormLink} in the place you want the link to display. If a save form email template is not provided, a browser cookie can restore the form data when they return to the page. An email template for the save form feature is created the same way as you would create an email for a publication or notification. For more information on creating email templates, see Create and Manage email publications and Create and Manage email notifications.
 

OrchestraCMS respects Salesforce security in relation to fields on a form. In order for a user to see the fields and submit the information, they must have Read and Create permissions to the Salesforce object(s) and Visible permissions to the fields used on the form. (Contact your Salesforce Administrator to create this security.)

Select a confirmation page, duplicate submission page, invalid URL page or save email template

  1. In the content editor, click in one of the following boxes: Confirmation Page, Duplicate Page, Invalid URL Page, or Save Form Email Template.
  2. In the Select Link dialog, choose the appropriate page and target destination, and then click Select.

To assist users with completing the form by checking for data errors along the way, you can enable inline errors. These warn users when the data they enter does not match the data type of the field. For example, if the user enters text into an email field that is not in the format of an email address.

 

OrchestraCMS preview mode will not display pages that are set to open in a pop-up window. If you submit a form in preview mode and, for example, the confirmation page is set to open in a pop-up window, the confirmation page will not display.

Enable inline errors

  • In the content editor, click to select Show Inline Errors.

When form properties have been set or changed, click Save in the Actions panel.