Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sicherheitslücken (CVE)USN-8797-1: GStreamer Base Plugins vulnerability(21.09.2026 um 20:05 Uhr)
Sichere ProgrammierungYou can build HTML emails with Tailwind CSS(21.09.2026 um 22:15 Uhr)
Sichere ProgrammierungDEV-Part-1-Backend.md(21.09.2026 um 22:24 Uhr)
Sichere ProgrammierungWhat It Actually Costs to Serve a 1M-Token Model in Production(21.09.2026 um 22:33 Uhr)
Sichere ProgrammierungHow to Check an Agent's Diagnosis Before It Touches Production(21.09.2026 um 22:53 Uhr)
Linux Tipps & HardeningWhat if Spotify was self-hosted? I think I got pretty close.(21.09.2026 um 22:33 Uhr)
Linux Tipps & HardeningSandboxing on Linux(21.09.2026 um 22:45 Uhr)
Sicherheitslücken (CVE)USN-8797-1: GStreamer Base Plugins vulnerability(21.09.2026 um 20:05 Uhr)
Sichere ProgrammierungYou can build HTML emails with Tailwind CSS(21.09.2026 um 22:15 Uhr)
Sichere ProgrammierungDEV-Part-1-Backend.md(21.09.2026 um 22:24 Uhr)
Sichere ProgrammierungWhat It Actually Costs to Serve a 1M-Token Model in Production(21.09.2026 um 22:33 Uhr)
Sichere ProgrammierungHow to Check an Agent's Diagnosis Before It Touches Production(21.09.2026 um 22:53 Uhr)
Linux Tipps & HardeningWhat if Spotify was self-hosted? I think I got pretty close.(21.09.2026 um 22:33 Uhr)
Linux Tipps & HardeningSandboxing on Linux(21.09.2026 um 22:45 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Umbraco Forms 12+, Custom Field Type

This is an addition to my previous post about Umbraco Forms. This time let's create a custom field! Sometimes we need fields that are not rendered in the FE, but FE needs to pass the values to the form submissions. I'm sure you also…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

This is an addition to my previous post about Umbraco Forms.



This time let's create a custom field!



Sometimes we need fields that are not rendered in the FE, but FE needs to pass the values to the form submissions. I'm sure you also have a few use cases in mind!



In my case, I needed to have a text string field for the address, and then FE was responsible for having a postcode look up and sending back 5 different fields to the BE and then to a custom workflow.



Let's dive right into how with steps;



1-Install Umbraco Forms for your Umbraco 12+ project

dotnet add package Umbraco.Forms



You'll need to buy your license for your domain when you go live!



2-Create a custom field type;




public class AddressLookupField : FieldType
{
public AddressLookupField()
{
Id = new Guid("2e26a579-2859-44fa-8778-fcdab81675d2");

Alias = "addressLookup";

Name = "Address Lookup";

Description = "Address Lookup";

Icon = "icon-terminal";

DataType = FieldDataType.String;

FieldTypeViewName = "FieldType.AddressLookupField.cshtml";

SortOrder = 10;

SupportsRegex = true;
}

public override IEnumerable<string> ValidateField(Form form, Field field, IEnumerable<object> postedValues, HttpContext context, IPlaceholderParsingService placeholderParsingService, IFieldTypeStorage fieldTypeStorage)
{
var returnStrings = new List<string>();

return base.ValidateField(form, field, postedValues, context, placeholderParsingService, fieldTypeStorage, returnStrings);
}
}






This class is for backoffice to understand there's a new field type to be added to the forms field types.

Here you can see it's now available as an answer type



Image description



3-We also need a .html file to display this field in the back office;

Add the following code to the path;

App_Plugins/UmbracoForms/backoffice/Common/FieldTypes/addresslookupfield.html




<input type="text" tabindex="-1"
class="input-block-level"
style="max-width: 300px" />






Now we can see the field too



Image description



4-Create a .cshtml file to

Views/Partials/Forms/themes/customProjectThemeFolder/FieldTypes/FieldType.AddressLookupField.cshtml



Here's the .cshtml will look like;




@model Umbraco.Forms.Web.Models.FieldViewModel
@using Umbraco.Forms.Web

<input type="text" name="addressLookup" id="addressLookup" class="text" value="@Model.ValueAsHtmlString" maxlength="500" />

<input type="hidden" name="addressLine1" id="addressLine1" class="text" value="@Model.ValueAsHtmlString" maxlength="500" />

<input type="hidden" name="addressLine2" id="addressLine2" class="text" value="@Model.ValueAsHtmlString" maxlength="500" />

<input type="hidden" name="city" id="city" class="text" value="@Model.ValueAsHtmlString" maxlength="500" />

<input type="hidden" name="postcode" id="postcode" class="text" value="@Model.ValueAsHtmlString" maxlength="500" />

<input type="hidden" name="country" id="country" class="text" value="@Model.ValueAsHtmlString" maxlength="500" />







As you can see, we only display the actual addressLookup field and there are 5 more additional fields that are hidden.



This is how you create a custom field!



Let's use this on a workflow;



When a form is submitted and you get your record fields by;

records.GetRecordFieldByAlias("addressLookup")?.Values; you get an array of the fields you had hidden!



Here's what my payload looks like



Image description



And Umbraco forms are smart enough to pick it up in the submissions!



Image description



Hope this helps someone!

B

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Umbraco Forms 12+, Custom Field Type

Thematisch verwandte Begriffe: Umbraco, Forms, Custom, Field · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-45381 | Tautulli is a Python based monitoring and tracking tool for Plex Media S…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick