Skip to content

Instantly share code, notes, and snippets.

@soen
Created June 14, 2016 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soen/7c21d4271dec820c1a2e6b957ff866f9 to your computer and use it in GitHub Desktop.
Save soen/7c21d4271dec820c1a2e6b957ff866f9 to your computer and use it in GitHub Desktop.
@using Sitecore.Mvc
@model CustomWFFM.CustomFieldTypes.Mvc.SingleLineTextWithPlaceholderField
@if (!Model.Visible)
{
return;
}
<div class="@Model.CssClass field-border">
@if (Model.ShowLegend)
{
<span class="@(@Model.CssClass + " field-title")">
@Html.Sitecore().Field("Title", Model.InnerItem)
</span>
}
<div class="@Model.CssClass field-panel">
@Html.HiddenFor(x => Model.FieldId)
<div class="@Model.CssClass field-content">
@Html.Editor("Value", new { FieldModel = Model, htmlAttributes = new { placeholder = @Model.PlaceholderText } })
</div>
@Html.ValidationMessageFor(field => Model.Value, null, new { @class = @Model.CssClass + " field-error" })
@if (!String.IsNullOrEmpty(Model.Information))
{
<span class=" @Model.CssClass field-info">@Html.DisplayFor(x => Model.Information)</span>
}
</div>
@if (Model.IsRequired)
{
<span class="@Model.CssClass field-required">*</span>
}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment