WriteInConfig

This element provides a blank field in which the respondent can hand write some text or draw a picture.

The hand-filled content of the WriteInConfig element is stored as an image during recognition and can be passed to optical character recognition library, such as Aspose.OCR.

WriteInConfig element

WriteInConfig element can be used to request some information in free form (name, phone, address, and the like) or to offer a respondent answer an open-ended question.

Declaration

WriteInConfig element is declared as an instance of WriteInConfig class. Reference Aspose.OMR.Generation.Config.Elements namespace to use WriteInConfig types without specifying the fully qualified namespace:

using Aspose.OMR.Generation.Config.Elements;

WriteInConfig element does not have required properties.

new WriteInConfig()

Optional properties

Name Type Default value Description
Name string n/a Used as a reminder of the element’s purpose; for example, “Phone”. You can use the same value for multiple elements.
This text is not displayed on the form.
Required bool false Set to true to store the hand-filled content of the element to Images collection during recognition. Set to false or omit the property to ignore this element during recognition.
Hint string “write-in” Redefine the underlying label of the write-in element.
Color Color Color.Black Color of the underlying label text.

Combining with VerticalChoiceBoxConfig elements

WriteInConfig element can be included into VerticalChoiceBoxConfig element to give the respondent the opportunity to provide a free-form answer to an open-ended question.

In this case, the content of the element is stored to Images collection only if the respondent marks the corresponding bubble.

Allowed child elements

None.

Example

TemplateConfig templateConfig = new TemplateConfig() {
	Children=new List<BaseConfig>() {
		new PageConfig() {
			Children = new List<BaseConfig>() {
				new ContainerConfig() {
					Name = "Example",
					Children= new List<BaseConfig>() {
						new BlockConfig() {
							Children = new List<BaseConfig>() {
								new ContentConfig() {
									Name = "Your phone number:",
									FontStyle = FontStyle.Bold
								},
								new WriteInConfig() {
									Name = "Phone",
									Required = true
								}
							}
						}
					}
				}
			}
		}
	}
};

WriteInConfig element example