Skip to main content
Skip table of contents

Adding editable input component

An input form field can be added to the template using following syntax:

{{input value=editModel.Title type="text" ariaLabel="Title"}}

For value attribute, always use "model.{{Binding}}" when in non-edit mode and "editModel.{{Binding}}" in edit mode.

Adding a placeholder to the input field.

Normally, a placeholder works as a hint for the user updating a value e.g. hint for a valid date format DD:MM:YY or mailid.

To add a placeholder simply add attribute placeholder and assign it some value.

{{input value=editModel.Title type="text" placeholder="Entry Title" ariaLabel="Title"}}

Special Case: Title field

For title field, we have a default value for placeholder which can be used using "editModel.TitlePlaceholder". If nothing is specified by the user at the time of creating an entry placeholder value is used as entry field.

The default value TitlePlaceholder looks like : "%EntryType% of %User% at computer %UserComputer%".

Example code


{{#form-container legacyController=legacyController}}
    {{#if editable}}
            <div data-col="sm-4 xs-12 valign-sm-center valign-xs-bottom" class="details-area-text-bold">
				{{label-helper value=editModel.Title label="Title:"}}
            <div data-col="sm-8 xs-12 valign-center" class="editable-field">
				{{input value=editModel.Title placeholder=editModel.TitlePlaceholder type="text"}}
            <div data-col="sm-4 xs-12 valign-sm-center valign-xs-bottom" class="details-area-text-bold">
            <div data-col="sm-8 xs-12 valign-center" class="details-area-text-bold">

Appearance in Content Manager

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.