Extend property editor stores value with [\r\n \"value\" \r\n]
Hello Umbraco community
I'm having some trouble with a custom property editor we made. The idea was to extend the default checkboxlist property editor to have its items translated.
\r\n doesn't show in SQL I don't think. Instead it shows as large amounts of white space. I suspect if you were to copy the value and paste it into a text editor you'd see newlines in it.
My question is why the default Umbraco CheckboxList property editor stores the values correctly in db and my custom editor is not (and adding "\r\n") ? Because as you see in the package.manifest I use the same View ("~/Umbraco/Views/PrevalueEditors/MultiValues.html") for editing as the default one.
Just for everybody knows. I don't still get how the problem is currently happening. As I don't have time to debug, I just switch "valueType" of the "editor" to JSON and it's working like it should.
Extend property editor stores value with [\r\n \"value\" \r\n]
Hello Umbraco community
I'm having some trouble with a custom property editor we made. The idea was to extend the default checkboxlist property editor to have its items translated.
Here is the package.manifest
In backoffice everything is working well. I can check values, save, edit another document, come back and my values are still there.
The problem comes in a View when I want to get the values stored by the custom checkbox list (by doing a Content.Value<>
I took a look in the database and it confirmed what I though (see the screenshot)
I took a look on how the values where stored by the default umbraco checkboxlist and there is no "\r\n" added (see the screenshot)
So.... Am I missing something?
Hi ced,
\r\n doesn't show in SQL I don't think. Instead it shows as large amounts of white space. I suspect if you were to copy the value and paste it into a text editor you'd see newlines in it.
Nik
That's the point Nik.
My question is why the default Umbraco CheckboxList property editor stores the values correctly in db and my custom editor is not (and adding "\r\n") ? Because as you see in the package.manifest I use the same View ("~/Umbraco/Views/PrevalueEditors/MultiValues.html") for editing as the default one.
Just for everybody knows. I don't still get how the problem is currently happening. As I don't have time to debug, I just switch "valueType" of the "editor" to JSON and it's working like it should.
Thanks to let me know if someone find a solution with "STRING"
is working on a reply...