Umbraco Forms user input disappearing after validation (v7.3.1 & v7.3.4)
I had posted this issue previously and thought that it had been fixed with Umbraco v7.3.0. However, it looks like it only worked in Umbraco v7.3.0. I am currently on v7.3.4 and the user input is disappearing again.
Ben and I are the only ones to see anything like this?
I know that Stijn (https://our.umbraco.org/member/151879) is not having the problem... what is unique about my and Ben's server /configuration /circumstance? Anything else that anyone can think to try?
ljcooper, are you using MVC or Web Forms? In my setup I am using Web Forms. If I get time I will setup a separate Umbraco Instance with MVC instead and see if that makes a difference.
Before I go further, I tested this in the following browsers and found that it was doing the same thing across the board:
Chrome (48.0.2564.109 m)
FireFox (44.0.2)
IE 11
IE 10
When I was testing IE 10 I noticed that there was a Javascript Error:
Chrome is throwing "Uncaught SyntaxError: Unexpected end of input".
FireFox is throwing this:
Debugging the Javascript I found that formId contains a guid. However, $("#values_" + formId).val() only contains "{" which is breaking the JSON.parse function.
The javascript is due to encoding of json in the hidden fields. The easiest solution is to change the quotes of the value in the partial to single quotes:
Thanks Damiaan. I tried that and it did remove the javascript error that I had found. However, it looks like my guess for why the validation is removing the user input was incorrect.
On forms where I have any validation all of the user's input is still disappearing if something is invalid.
We haven't been able to on more than 4 implementations (webforms and mvc). Either we're doing something unbelievably wrong every time, or something is broken somewhere, I haven't had the time to invest to try to figure out the bug.
If you can reproduce the problem on a clean umbraco installation, create an issue on http://issues.umbraco.org. I don't have spare time to do so.
Don't forget to mention this thread in the issue (and the other way around).
I tried to log the issue on the http://issues.umbraco.org site but I can't login. I click on guest in the upper right corner and then Log in. This seems to be giving me a Javascript error "Uncaught TypeError: Cannot read property 'logout' of null"
I have tried to login with both Chrome and FireFox with the same results.
Here are the steps that I went through to reproduce the problem with Umbraco Forms:
Manually Installed Umbraco v7.4.1 without anything extra
In config/umbracoSettings.config set defaultRenderingEngine to WebForms
Installed Umbraco Forms by going to Forms on the left nav and clicking on the blue "Install" button
Created a document that only has one field, a Macro that only allows "Insert Form"
Have the template output the form that was selected and insert a script reference to jQuery in the head tag
Created a simple form with 3 text fields, the first two being mandatory and the last one being optional
Created a new page, select the form that was just created, and Save and Publish it
Visit the new page
Fill in only the first mandatory field and submit
The page refreshes and the user input is gone, leaving only and indication of which fields were missed.
Umbraco Forms user input disappearing after validation (v7.3.1 & v7.3.4)
I had posted this issue previously and thought that it had been fixed with Umbraco v7.3.0. However, it looks like it only worked in Umbraco v7.3.0. I am currently on v7.3.4 and the user input is disappearing again.
Here was the previous post: https://our.umbraco.org/forum/umbraco-pro/contour/71304-umbraco-forms-user-input-disappearing-after-validation
I'm seeing the same issue
Forms 4.1.5 + Umbraco 7.3.4
I also had the issue with Umbraco 7.3.1 + Forms 4.1.5, and Forms 4.1.4.
No one else has this issue?
Ben and I are the only ones to see anything like this?
I know that Stijn (https://our.umbraco.org/member/151879) is not having the problem... what is unique about my and Ben's server /configuration /circumstance? Anything else that anyone can think to try?
ljcooper, are you using MVC or Web Forms? In my setup I am using Web Forms. If I get time I will setup a separate Umbraco Instance with MVC instead and see if that makes a difference.
This happening to me both in MVC and Webforms, unfortunately.
I'm going follow up on your observation below as well to see what I see in various browsers.
Before I go further, I tested this in the following browsers and found that it was doing the same thing across the board:
When I was testing IE 10 I noticed that there was a Javascript Error:
Chrome is throwing "Uncaught SyntaxError: Unexpected end of input".
FireFox is throwing this:
Debugging the Javascript I found that formId contains a guid. However, $("#values_" + formId).val() only contains "{" which is breaking the JSON.parse function.
Ben,
I am seeing this issue too.
The javascript is due to encoding of json in the hidden fields. The easiest solution is to change the quotes of the value in the partial to single quotes:
Kind regards
Damiaan
Thanks Damiaan. I tried that and it did remove the javascript error that I had found. However, it looks like my guess for why the validation is removing the user input was incorrect.
On forms where I have any validation all of the user's input is still disappearing if something is invalid.
Is anyone able to use Validation with Umbraco Forms?
We haven't been able to on more than 4 implementations (webforms and mvc). Either we're doing something unbelievably wrong every time, or something is broken somewhere, I haven't had the time to invest to try to figure out the bug.
If you can reproduce the problem on a clean umbraco installation, create an issue on http://issues.umbraco.org. I don't have spare time to do so. Don't forget to mention this thread in the issue (and the other way around).
I tried to log the issue on the http://issues.umbraco.org site but I can't login. I click on guest in the upper right corner and then Log in. This seems to be giving me a Javascript error "Uncaught TypeError: Cannot read property 'logout' of null"
I have tried to login with both Chrome and FireFox with the same results.
Here are the steps that I went through to reproduce the problem with Umbraco Forms:
If I can login to http://issues.umbraco.org I will post the problem there.
You need to create a new account on issues.umbraco.org. It's not single sign on.
This is the url to create an account: http://issues.umbraco.org/registerUserForm
Thanks Damiaan. I already have an account, I just can't login to the site. It seems that I am not the only one not able to login:
https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/75556-cant-login-to-umbraco-issues#comment-241687
I will keep trying the Issues site throughout the day and will post the bug there once I am able to login.
Hi Damiaan. I found I was able to use the login link from the Register User Form link you provided. Thanks!
I have posted the issue here:
http://issues.umbraco.org/issue/U4-8105
Alright, I finally have this working. Just upgraded Umbraco from v7.4.3 to v7.5.6 and now it works!
I also had to add in references to jQuery Validate (https://our.umbraco.org/documentation/products/umbracoforms/developer/Prepping-Frontend/).
Pretty sure I tried this previously and it wasn't working, but I could have missed it before as well.
is working on a reply...