Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ÆØÅ in "name" breaks form #122

Closed
rasmusfjord opened this issue Apr 4, 2017 · 4 comments
Closed

ÆØÅ in "name" breaks form #122

rasmusfjord opened this issue Apr 4, 2017 · 4 comments
Assignees

Comments

@rasmusfjord
Copy link

Hey there

We have a large form with FormEditor but we are seeing some wierd bug, i dont know if it is focused around ÆØÅ in the name/alias of a field.

The error is :
pasted image at 2017_04_04 01_36 pm

The field that it fails at looks like this:
pasted image at 2017_04_04 01_44 pm

If it is the æøå we should maybe lock the alias field and autogenerate it with an option to unlock and overwrite it.

@rasmusfjord
Copy link
Author

Their might still be something with øæå but we found something else with ng-show that one of our angular gurus fixed for us.

when you validate you use the css class hide/show but if your(read our) markup dosnt have any handling for the 2 css classes, it will not work. But if you instead use ng-show it would swap the hide/show classes and it would work.

@kjac
Copy link
Owner

kjac commented Apr 4, 2017

Hey @rasmusfjord,

The field aliases aren't supposed to be able to have ÆØÅ in them... clearly something's wrong with the regex'es that should prevent this, as you can see the lower cased "æ" is removed but not the upper cased "Å". I'll have a look at that.

With regard to the hide/show part, FormEditor was created to play nice with the bootstrap CSS out of the box. I agree, ng-show or ng-if would be a more angular-ish approach. I will have a look at that as well as soon as I can.

@rasmusfjord
Copy link
Author

As always Kenn you rock and keep up the good work.

Yeah one would argue that the bootstrap everything era is ending so its properly a good idea to go for a more pure appoarch where its just shown/not shown with angular.

Say if you need testers, Alt. you could lean up against the umbraco doctype alias namer where it also locks the field, because our backoffice editors(customers) are a bit confused over the 2 top fields when adding a new field in formeditor. Because in danish its "navn"(name) and "Tekst"(text) where you could argue that "navn"(name) should be refrased alias, and the "navn"(name) should replace the current "Tekst"(text) field. If you get my point :)

@kjac
Copy link
Owner

kjac commented Apr 5, 2017

@rasmusfjord thanks.

I've replicated the issue - it only happens if you have special characters in the very beginning of the field name, that's why I haven't caught it before. I'll submit a fix for it soon, but if it's not urgent for you then I'll hold off the next release until I've verified everything with the Umbraco 7.6 RC.

Also I've moved your other comment about ng-show/hide to #123 and will solve that asap as well.

@kjac kjac self-assigned this Apr 5, 2017
@kjac kjac closed this as completed in cf936ff Apr 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants