Performing Service Operations Using APIs > Rendering Forms > Rendering HTML Forms Using Custom CSS Files

Rendering HTML Forms Using Custom CSS Files
The Forms service renders HTML forms in response to an HTTP request from a web browser. When rendering an HTML form, the Forms service can reference a custom CSS file. You can create a custom CSS file to meet your business requirements and reference that CSS file when using the Forms service to render HTML forms.
The Forms service silently parses the custom CSS file. That is, the Forms service does not report errors that may be encountered if the custom CSS file does not comply with CSS standards. In this situation, the Forms service ignores the style and continues with the remaining styles located in the CSS file.
The following list specifies styles that are supported in a custom CSS file:
Class level selector-style pairs: If present in a custom CSS file, selectors used in the HTML form as class styles are used. Unused class styles are ignored.
Identifier level selector-style pairs: All identifier styles are used if they are used in the HTML form.
Element level selector-style pairs: All element styles are used if they are used in the HTML form.
Style Priority: Style priority (like important) is supported and can be used in a custom CSS file.
Media Type: One or more selector-style pairs can be wrapped in @media style to define the media type. The Forms service does not check whether the specified media type is supported. The media type specified in the custom CSS file is merged in the HTML form.
You can retrieve a sample CSS file by using the FormsIVS application. Upload the form, select it in the Test Form Design page, and click GenerateCSS. You are not required to set the HTML transformation type before clicking the button. Next select save. You can edit this CSS file to meet your business requirements.
Note: Before rendering an HTML form that uses a custom CSS file, it is important that you have a solid understanding of rendering HTML forms. (See Rendering Forms as HTML.)
Note: For more information about the Forms service, see LiveCycle ES Services.
Summary of steps
To render an HTML form that uses a CSS file, perform the following tasks:
1.
2.
3.
4.
5.
 
Include project files
Include necessary files in your development project. If you are creating a client application by using Java, include the necessary JAR files. If you are using web services, ensure that you include the proxy files.
Create a Forms Java API object
Before you can programmatically perform an operation supported by the Forms service, you must create a Forms client object.
Reference the CSS file
To render an HTML form that uses a custom CSS file, ensure that you reference an existing CSS file.
Render an HTML form
To render an HTML form, you must specify a form design created in Designer ES and saved as an XDP file. You must also select an HTML transformation type. For example, you can specify the HTML transformation type that renders a dynamic HTML for Internet Explorer 5.0 or later.
Rendering an HTML form also requires values, such as URI values needed to render other form types.
Write the form data stream to the client web browser
When the Forms service renders an HTML form, it returns a form data stream that you must write to the client web browser to make the HTML form visible to the user.
 

Performing Service Operations Using APIs > Rendering Forms > Rendering HTML Forms Using Custom CSS Files

Programming with LiveCycle ES (LiveDocs)
Adobe LiveCycle ES Update 1

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/000340.html