I have created a custom field "RichtextCheckbox" in Sitecore forms after following this tutorial (https://pushpaganan.home.blog/2020/02/06/adding-a-custom-rich-text-field-to-sitecore-forms/)
I have created RichtextCheckbox under /sitecore/client/Applications/FormsBuilder/Components/Layouts/PropertyGridForm/PageSettings/Settings/RichTextCheckbox
/sitecore/templates/System/Forms/Fields/Custom Fields/RichText Checkbox
/sitecore/system/Settings/Forms/Field Types/Basic/RichText Checkbox
This is the code.
protected override void InitItemProperties(Item item)
{
base.InitItemProperties(item);
RichText = StringUtil.GetString(item.Fields["Rich Text"]);
}
protected override void UpdateItemFields(Item item)
{
base.UpdateItemFields(item);
item.Fields["Rich Text"]?.SetValue(RichText, true);
}
@Html.Raw(Model.RichText)
I have created a form and added Default form save action. While posting form data to database,the custom field is not saved in database
I have inherited Save settings template in the RichText Checkbox template and also the "Allow Save" option is checked under the form (/sitecore/Forms/Test form/page/richtextcheckbox)
But the custom field is not saving. Is there anything missing in my code?