A TextField is a field control used to edit and display text values. Wherever you have a Title, Name or similar property, you can use a TextField.
TextField in Write mode, used in the backend form for creating News.
TextField in Read mode, used in the widget template for the News widget.
Whenever you are developing a static module, your persistent model is implemented as a class in C# or VB. In this case, fields are normal properties in that class. To make up the user interface of your module, we recommend using definitions. For an example of implementing those definitions, you can read Custom Products module: Create the backend definitions.
To use TextField in a static module, you should use the following code in the definitions of your module:
var titleField =
DataFieldName = (displayMode == FieldDisplayMode.Write) ?
DisplayMode = displayMode,
WrapperTag = HtmlTextWriterTag.Li,
In the code above, you just create a new TextFieldDefinitionElement and add it to the section. The DataFieldName property should be the name of the property in your persistent class, which will contain the value. If you are localizing all your labels for the module, you should also set the ResourceClassID property, as the example does with ProductsResources.
You can also use TextField in a custom field that you create through the user interface. You can do that in the built-in Sitefinity CMS modules (static and dynamic), as well as in your custom modules. When you are creating the custom field through the UI, you should specify a custom widget for entering data. The type that you need to use is Telerik.Sitefinity.Web.UI.Fields.TextField.
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important
Copyright © 2021 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, Ipswitch, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.
Powered by Progress Sitefinity