Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

Labels in EPI server forms



I wonder how to place a label without a text area in EPI server forms, just a text label, any idea? Also I wonder why my captcha is letters not a check box? My episerver is 7.5

Edited, Feb 06, 2019 14:13

Label without input element doesn't make much sense.

You should use p or span instead.

To create a custom form element, you can create a class that inherits from ElementBlockBase and decorate it with ContentType attribute.

You can then create a view, and register it in TemplateCoordinator (ref. Alloy).

To hide Label and Tooltip properties in edit mode, you can do something like this:

public new virtual string Label { get; set; }

public new virtual string Description { get; set; }
Edited, Feb 06, 2019 15:20

I don't have access to the backend system to edit the code of the backend. I know that it might not make sense, but for example if I want to write some information text without the need of input like the example below:

*An email will be sent to you after sumbitting this form.

Feb 06, 2019 16:10

Episerver Forms comes with a block element called Rich text (with placeholders).

Does that work for you?

Edited, Feb 06, 2019 16:20

Edit: This information is incorrect (see below), reply edited. 

Dejan, the Rich Text is an input element, which is a bad semantic choice for this. It seems OP is asking for a way to place a non-editable text element in-between form elements. 

Unfortunately, Forms doesn't have this capability out-of-the-box. Your alternatives are:

  • Use Rich Text form element
  • Place your instructional text on the page/block before you insert the form
  • Place your instructional text in the form description (before the form elements)
  • Make a custom form element
Edited, Feb 11, 2019 10:06

Arild, that's exactly what rich text element does. It renders DIV/paragraphs, not an input element.

Edited, Feb 11, 2019 12:21

Dang Dejan, you are right, and I am wrong - confused it with the textarea element! I blame Mondays. 

Feb 12, 2019 10:21
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.