You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Sitefinity自定义FormControls添加Choices:匹配内置多选字段功能

问题:为FormControls小部件实现与内置MultipleChoiceField一致的Choices功能

我正在构建一款FormControls小部件,已添加sf-html-field和sf-image-field控件。当前需要为其添加Choices功能,希望该功能的工作方式与内置MultipleChoiceField控件完全一致,但不确定最优实现方案。

以下是我的DesignerView.Simple代码:

<form>
    <div class="form-group">
        <label for="heading-text">Label (Question)</label>

        <sf-html-field class="kendo-content-block"
                       sf-model="properties.Question.PropertyValue">
        </sf-html-field>

    </div>

    <div class="form-group">
        <label for="image-field" class="m-top-sm">@Html.Resource("Image")</label>
        <sf-image-field class="sf-Media--info modal-settings modal-settings-space"
                        sf-model="properties.ImageId.PropertyValue"
                        sf-image="selectedImage"
                        sf-provider="properties.ImageProviderName.PropertyValue"
                        sf-media-settings="@SettingsHelpers.GetMediaSettings("Image")"
                        id="image-field">
        </sf-image-field>
    </div>

    <div class="form-group">
        <label for="heading-text">Choices</label>

    </div>
</form>

相关界面截图:
添加选项界面
选项输入界面

内容的提问来源于stack exchange,提问作者Jefferson

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.22 00:09:20