Copied to clipboard

Flag this post as spam?

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


  • Carl Bussema 38 posts 140 karma points
    Feb 25, 2016 @ 18:46
    Carl Bussema
    0

    Form with custom javascript broken in 4.1.5

    I had a form working in 4.1.4; due to needing a repeated field, I used JavaScript to intercept the submit() event, took the values of the repeated fields (which do not match any fields Umbraco Forms knows about), and serialized them out into a field that was CSS hidden. There's also an XLST to deserialize them before e-mailing the notice of submission. This all worked fine.

    I upgraded to 4.1.5, and it looks like the only change to Form.cshtml is the addition of the hidden field for RecordState, which I added.

    My javascript event still fires and copies the serialized value into the field that Umbraco should be tracking, but when I reach the next page of the form and check it with a Razor breakpoint, e.g., inspecting Model.Pages[2].Fieldsets[0].Containers[0].Fields[0].Value , that value is now string.Empty where before it was the correct serialized value.

    So what changed behind the scenes? Do I need to somehow update RecordState myself?

Please Sign in or register to post replies

Write your reply to:

Draft