auto_stories Knowledge Base chevron_right Form chevron_right Article

Rich Textv5

This form element is used to store and display rich text content within a form page. It allows users to apply text formatting, alignment, bullet lists, images, hyperlinks, and other rich content elements.

 

Appearance in Toolbox

Appearance in Free Form

Appearance in Responsive Form

Appearance in Flexible Form

 

 

 

 

 

 

 

 

 

 


 

Compatibility

Free Form

Responsive Form

Flexible Form

Mobile

 

 

 

 

 

 

 

 

Properties

Type: Displays the type of the form element. This value cannot be modified.
Name: The name of the tool will be written here.
Help Text: It is the text that is entered for comment when the mouse is placed on the tool.


Height / Width: Adjusts the height and width of the tool (The width field has been removed from Responsive Forms).
From Left / Top: Adjusts the distance of the tool from the left and top (This field has been removed from responsive forms).
Hide Header: Hides the properties section of the form element on the Client screen.
Fit Horizontal: Fits the tool to the full screen on the user’s screen.
Pin Right: Pins the tool to the right.
Display: Makes the tool not appear on the screen.
Form Only: It is used not to create database related.

 

Actions Available for the Rich Text Element

Each form element added to a form page has its own set of available actions. No actions are defined for the Rich Text element.

 

Example Used

A tool used for writing complicated texts within a form. An example of how to use and client view of the editor as in below.

 e3.png

 Client view on screen 


Using the Rich Text Element in Output Design

 

To ensure that Rich Text fields are displayed correctly in the output design, you must paste the following code into the Scripts section located at the top of the Report Design area and then save the changes.

 

1- To do this, open the Report File List window by clicking the Form button from the predefined form buttons or by using the CTRL+F keyboard shortcut.


2- In the Report Design area that opens and contains your Rich Text element, click the Script button located at the top of the page.

 


3- After selecting the name of your design from the first drop-down list, select BeforePrint from the second drop-down list. Then, copy the code below and paste it into the empty area. Finally, click the button with the check mark to save the script.


For Version 4, use the script code shown in the image below.

 


private void richText1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) {
var rtf = System.Web.HttpUtility.HtmlDecode(StripHTML(Convert.ToString(GetCurrentColumnValue("Editor_1"))));
richText1.Html = rtf;
}
private string StripHTML(string input)
{
return System.Text.RegularExpressions.Regex.Replace(input, "<.*?>", String.Empty);
}

 

For Version 5, use the script code shown in the image below.


using System.Net;
private void richText1_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e)
{
    var html = Convert.ToString(GetCurrentColumnValue("Editor_1"));
    var text = WebUtility.HtmlDecode(
        StripHTML(html ?? string.Empty)
    );
    richText1.Html = text;
}
private string StripHTML(string input)
{
    return System.Text.RegularExpressions.Regex.Replace(
        input,
        "<.*?>",
        string.Empty
    );
}