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
Hello,
I'm following this document to format magic strings with truncate filter: https://docs.umbraco.com/umbraco-forms/developer/magic-strings
I would like to understand if there is way to leave out the three dots (...) that are added to the end of a truncated strings.
@field= "abcdefghijklm" [@field | truncate: 10] result: abcdefghij... expected result: abcdefghij
Hi mts
Yes, I think it depends on the version of Umbraco Forms, but I think there the truncate angularJS implementation is shared with the Umbraco core...
https://github.com/umbraco/Umbraco-CMS/blob/fdea8c28c89c62bf33272e67b3d7770ff2becf9f/src/Umbraco.Web.UI.Client/src/common/filters/truncate.filter.js#L3
So it feels like it's possible to set the 'tail', to be an empty string... So my guess is something like this:
[@field | truncate:false:10]
Regards
Marc
Hi Marc,
Thank you for your help!
I tried different ways to get it work but no luck so far. Result is always that a) field is not truncated or b) field is truncated and three dots follow.
I'm unable to check Forms version but can ask for it.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Umbraco Forms and formatting magic string
Hello,
I'm following this document to format magic strings with truncate filter: https://docs.umbraco.com/umbraco-forms/developer/magic-strings
I would like to understand if there is way to leave out the three dots (...) that are added to the end of a truncated strings.
Hi mts
Yes, I think it depends on the version of Umbraco Forms, but I think there the truncate angularJS implementation is shared with the Umbraco core...
https://github.com/umbraco/Umbraco-CMS/blob/fdea8c28c89c62bf33272e67b3d7770ff2becf9f/src/Umbraco.Web.UI.Client/src/common/filters/truncate.filter.js#L3
So it feels like it's possible to set the 'tail', to be an empty string... So my guess is something like this:
[@field | truncate:false:10]
Regards
Marc
Hi Marc,
Thank you for your help!
I tried different ways to get it work but no luck so far. Result is always that a) field is not truncated or b) field is truncated and three dots follow.
I'm unable to check Forms version but can ask for it.
is working on a reply...