This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"gotoPageOnSubmit": "eab72f13-b22e-46d5-b270-9c196e49a53b" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Guid? GotoPageOnSubmit { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"route": { | |
"path": "/contact-us/", | |
"startItem": { | |
"id": "ca4249ed-2b23-4337-b522-63cabe5587d1", | |
"path": "home" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Umbraco.Cms.Core.Models.PublishedContent; | |
using Umbraco.Cms.Core.PropertyEditors; | |
using Umbraco.Cms.Core.PropertyEditors.DeliveryApi; | |
using Umbraco.Forms.Core.Models; | |
using Umbraco.Forms.Core.Models.Api; | |
using Umbraco.Forms.Core.Services; | |
namespace Umbraco.Forms.Core.PropertyEditors.ValueConverters | |
{ | |
[DefaultPropertyValueConverter] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"contactForm": { | |
"id": "3623b232-9296-4bf0-b16c-57801dc4f296", | |
"form": { | |
"id": "3623b232-9296-4bf0-b16c-57801dc4f296", | |
"name": "Contact Form", | |
"pages": [ ... ] | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"contactForm": { | |
"id": "3623b232-9296-4bf0-b16c-57801dc4f296", | |
"form": null | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Contact Us", | |
"route": { | |
"path": "/contact-us/", | |
"startItem": { | |
"id": "ca4249ed-2b23-4337-b522-63cabe5587d1", | |
"path": "home" | |
} | |
}, | |
"id": "4a1f4198-e143-48ba-a0f5-1a7ef2df23aa", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal class MyApiPostedValuesConverter : JsonConverter<IDictionary<string, IList<string>>> | |
{ | |
public override bool CanConvert(Type typeToConvert) => true; | |
public override IDictionary<string, IList<string>> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) | |
{ | |
if (reader.TokenType != JsonTokenType.StartObject) | |
{ | |
throw new JsonException(GetJsonExceptionMessage("Start object token not found")); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal class MyApiPostedValuesConverter : JsonConverter | |
{ | |
public override bool CanConvert(Type objectType) => objectType == typeof(IDictionary<string, IList<string>>); | |
public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) | |
{ | |
var properties = JToken.Load(reader).Cast<JProperty>().ToList(); | |
var result = new Dictionary<string, IList<string>>(); | |
foreach (JProperty property in properties) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[JsonConverter(typeof(MyApiPostedValuesConverter))] | |
public IDictionary<string, IList<string>> Values { get; set; } |