Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • RunnicFusion 62 posts 145 karma points
    Nov 24, 2017 @ 13:12
    RunnicFusion
    0

    Field are empty when viewing submitted form with conditional fields

    When viewing my form with conditional fields the fields are saved with values. But when i view the submitted form on the front-end side (with the ?recordId querystring), the form fields that are inside a conditional fieldset are empty.

    When I debug the view the model has no value.

    FieldType.TextField.cshtml:

        @model Umbraco.Forms.Mvc.Models.FieldViewModel
    
    <input type="text" name="@Model.Name" id="@Model.Id" class="form-control" value="@Model.Value" maxlength="500"
    @{if(string.IsNullOrEmpty(Model.PlaceholderText) == false){<text>placeholder="@Model.PlaceholderText"</text>}}
    @{if(Model.Mandatory || Model.Validate){<text>data-val="true"</text>}}
    @{if (Model.Mandatory) {<text> data-val-required="@Model.RequiredErrorMessage"</text>}}
    @{if (Model.Validate) {<text> data-val-regex="@Model.InvalidErrorMessage" data-regex="@Html.Raw(Model.Regex)"</text>}}
    />
    
    @if(Model.Name == "15fec2c7-1aa7-4834-ab97-3c7e82ab738e")
    {
        @Model.Value
    }
    

    The latest if is to view the value of an conditional field. The non conditional fields are showing fine.

    Information: Umbraco 7.5.8 Forms version: 4.4.0

    How can I get the conditional values to be shown inside my submitted form?

  • RunnicFusion 62 posts 145 karma points
    Dec 11, 2017 @ 07:34
    RunnicFusion
    0

    Someone?

Please Sign in or register to post replies

Write your reply to:

Draft