November Happy Hour will be moved to Thursday December 5th.

Labels in EPI server forms

Vote:
 

Hi,

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

#201133
Edited, Feb 06, 2019 14:13
Vote:
 

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:

[ScaffoldColumn(false)]
public new virtual string Label { get; set; }

[ScaffoldColumn(false)]
public new virtual string Description { get; set; }
#201134
Edited, Feb 06, 2019 15:20
Vote:
 

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.


#201135
Feb 06, 2019 16:10
Vote:
 

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

Does that work for you?

#201137
Edited, Feb 06, 2019 16:20
Vote:
 

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
#201245
Edited, Feb 11, 2019 10:06
Vote:
 

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

#201248
Edited, Feb 11, 2019 12:21
Vote:
 

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

#201287
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.