Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I having issue with prevalues when using Umbraco.CheckBoxList data type.
If my prevalue is a string containing commas "," it breaks the string into different line and comma is remove.
Sounds like there is split being done.
Is there a way to resolve this issue am using Umbraco version 7.6.3 assembly: 1.0.6361.21154
Thank you for your kind reply
What an Interesting behavior!
What about using the html entity for comma?
@Johannes Tak :)
it works thank you very much if i set the prevalue to
We have 2,3 kr to give
I have use @Html.Raw(value.Replace("",", ","))
However that might be not user friendly when inserting values with comma like this.
Is there another approach i can use the commas sign itself in the prevalue
I saw a bug reported
Hmm, shoulden't it just work with @Html.Raw() ?
Just let me doubble check, dose this happen in the backoffice or when you try to print it in your code?
Yes i set the prevalue in the backoffice ,
Initially if i set the prevalue "We have 2,3kr to give" with a normal commas , this will split the string into 2 string
I have use @Html.Raw(value.Replace("," ,","))
So i went this approach i change the , to , in the prevalue , and
this result to "We have 2,3kr to give" and in my code i did the following below
"We have 2,3kr to give"
@Html.Raw(value.Replace(",,",")) this works but for the user to replace all normal commas to "," , might cause misspelling and does not look great to read .
What about using a dot? (".") And then do a String.Replace ? Maybe not ideal but should be more user friendly than using ,..
Hi Johannes ,
I will propose the user to go with a ; instead of . as it is used in the prevalue string sometimes.
But this is an issue with umbraco itself as i understood per related reported bug
Again thank you very much for your kind help.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted