Single- and Multi-Select Questions with Custom Item Template
If you want to customize an item in a single- or multi-select question (Radiogroup, Checkbox), follow the steps below: Read more...
If you want to customize an item in a single- or multi-select question (Radiogroup, Checkbox), follow the steps below:
Implement a component that renders item markup.
The item is an object that implements theIAction
interface. This object is passed to the component as a prop.Register the component so that it can be accessed by name.
In React, register the component inReactElementFactory
as shown in theSurveyComponent.jsx
file.
In Angular, register the component inAngularComponentFactory
as shown in thecustom-choice-item.component.ts
file.
In Knockout, use techniques native to this library: Component Registration in Knockout.Assign the component name to the question's
itemComponent
property in the survey JSON schema.