Additional Fields on the Create Page

You can add any supported field type to a create form.

In addition to the basic attributes described in Defining the Basic Attributes, you can configure any other required fields as described in Form Fields.

The following topics are discussed:

Connections

After creating an object, you may need to connect it to another object. For example, when an RFQ is created, you usually want to connect it to an RFQ Template object using the RFQ Template relationship.

To configure an object to be connected to another object:

  1. Configure a field with the RangeHref parameter to show the chooser for selecting a template or parent or other required object.
  2. Use the Update Program or Update Function setting to make the connection between the newly-created object and the template/parent object.

The create page first creates the object, then passes the necessary information to the JPO defined by the Update Program or Update Function setting where the connection is made. Both actions are done in a single transaction. See Create Form Code Samples for sample code to connect the newly-created object to an existing object.

As an alternative, you can pass the objectId, relationship, and direction URL parameters to emxCreate.jsp and the connection will be made as part of the creation transaction. This case requires that you know the objectId of the object to which the newly-created object will be connected.

The connection is only made if validation passes. The create component checks whether or not the relationship and objectID parameters were passed in. If so, the create component makes the required relationship connection.

Hidden Fields

You may need to store information in hidden fields during the creation process. In this case, you can use the Field Type = programHTMLOutput setting. The program should return the HTML code stored in the hidden fields needed by the create page.

When using a field type of programHTMLOutput, the JPO specified must return a string in XHTML format. See Create Form Code Samples for an example JPO.

As an alternative, you can pass required parameter/value pairs as URL parameters (see URL Parameters Accepted by emxCreate.jsp) and the JPO that uses those parameters/values (such as a postProcessJPO) can access them using the requestMap.

Default Values

When defining fields, emxCreate.jsp automatically uses the default value of the attribute as the default field value. If you want to specify a different default, set the Default=value setting. The default value setting overrides the attribute's default value.