Hi All,
I'm testing umbraco forms on 7.3.
The conditions in umbraco forms aren´t working in frontend in 7.3.
I done all the steps to put forms working. I also tested in 7.2.8 and is working.
I'm getting an error on console: "Uncaught SyntaxError: Unexpected end of input".
Even if don´t have conditions i get this error.
The hidden field is not displayed when i choose an option.
Please be aware that this is still an issue even with the change if an apostrophe is used in a field value. I have submitted a ticket suggesting possible fixes.
Umbraco forms conditions with umbraco 7.3
Hi All, I'm testing umbraco forms on 7.3. The conditions in umbraco forms aren´t working in frontend in 7.3. I done all the steps to put forms working. I also tested in 7.2.8 and is working.
I'm getting an error on console: "Uncaught SyntaxError: Unexpected end of input". Even if don´t have conditions i get this error.
The hidden field is not displayed when i choose an option.
It seems indeed a bug in Forms under 7.3
The workaround I found is to replace one line in Views/Partials/Forms/Script.cshtml
<input type="hidden" id="[email protected]" value="@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model.Pages.SelectMany(p => p.Fieldsets).SelectMany(fs => fs.Containers).SelectMany(c => c.Fields).ToDictionary(f => f.Id, f => f.Value)))" />
with
<input type="hidden" id="[email protected]" value='@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model.Pages.SelectMany(p => p.Fieldsets).SelectMany(fs => fs.Containers).SelectMany(c => c.Fields).ToDictionary(f => f.Id, f => f.Value)))' />
The difference is using apostrophes instead of quotes for value attribute.
Thanks a lot Gleb,
Works with that change.
Please be aware that this is still an issue even with the change if an apostrophe is used in a field value. I have submitted a ticket suggesting possible fixes.
http://issues.umbraco.org/issue/CON-1163
Cheers
James
Still an issue in Umbraco Forms 4.1.4 on Umbraco 7.3.2
Gleb's workaround works:
Thank you Gleb!!! This change certainly worked for me! Conditions now working as expected :)
is working on a reply...