Search Support
-
Lukas PrützelMarch 26, 2020 at 3:00 am #5736
Hi,
this might be trivial but we are having issues recreating the dojo behaviour for e-mail adresses in output text fields in SparkUI.
While Dojo seems to convert e-mail adresses to mailto: links automatically, sparkUI leaves them as plain text.
we found this page in the spark UI Doc describing a potential way to alter how the plain text is displayed:
https://salientprocess.zendesk.com/hc/en-us/articles/206348467-Formulas-In our first attempt we added the following line to the Text formula field (Output being the Control ID of the field itself):
Note: The HTML Formatting seems to mess up my code html input code so I’ll try to break it down, otherwise please check the attached pictures.a href here mailto:"[email protected]{Output}+"\">"[email protected]{Output}+ a end tag here
This seems to work in a recursive way, however.
When using this code on the field itself, the output looks as followed:
[email protected]”>[email protected]
As soon as we reference a plain text field instead, the code works as intended:
[email protected] (as mailto: link)
I’ve included 4 screenshots demonstrating my problem. The first 2 screenshots show the self reference issue, while the 3rd and 4th picture demonstrate that it works as soon as I reference a different field.
I know that this is probably the intended behaviour. However, it would be appreciated if you could give us some insight on how we would go about altering the bound variable for display without actually using a 2nd element.
Thank you for your help and with best regards,
Lukas
-
This topic was modified 3 years ago by
Lukas Prützel.
-
This topic was modified 3 years ago by
Lukas Prützel.
-
This topic was modified 3 years ago by
Lukas Prützel.
-
This topic was modified 3 years ago by
Lukas Prützel. Reason: add pre to keep the html from editing my Text formular field input
-
This topic was modified 3 years ago by
Lukas Prützel. Reason: other try to keep the html formatting from messing with my input (""[email protected]{Output}+"")
SPARK SupportMarch 26, 2020 at 7:42 am #5746Hi Lukas,
A more simple approach would be to check the Allow HTML configuration option under Behavior. Then bind the control to something like:
“<a href=mailto:[email protected]>[email protected]</a>”
Regards,
Stephen P.
Lukas PrützelMarch 27, 2020 at 7:44 am #5748Hi Stephen,
This doesn’t really work for us since we just want to alter how the variable is displayed. The content of the variable is provided from outside and part of a bigger business object.
This business object is bound to a coach view that displays basic infos on each page (e.g. name, email and phone).
So we would have to manually copy the business object in each task, edit the email and then bind it to the coachview.We therefor search for a solution, that allows us to prepend and append the necessary HTML right inside the coachview (and only the coachview) I guess.
EDIT: Since the BO containing the email is provided as an input and I can’t guarentee that it’s not also an output somewhere, I wouldn’t want to actually edit the email variable. That might lead to the wrong e-mail being used somewhere down the line.
-
This reply was modified 3 years ago by
Lukas Prützel.
SPARK SupportMarch 27, 2020 at 3:54 pm #5750Hi Lukas,
Have you tried your formula with the Allow HTML setting checked? The output in your first example “[email protected]”>[email protected]” appears to be stripped of the HTML tags.
Regards,
Stephen P.
Lukas PrützelMarch 29, 2020 at 10:45 pm #5751Hi Stephen,
I have already checked/activated the allow HTML Option in this example.
The issue is caused by the Text formula event. It seems to use convert the output accoring to the text formula twice.Regards,
Lukas
Lukas PrützelApril 6, 2020 at 1:05 am #5757Hi Stephen,
I have implemented a workaround using an additional hidden field as seen in the image attached below.
According to this page: https://salientprocess.zendesk.com/hc/en-us/articles/206348467-Formulas-
${FieldName}.getValue() and @{FieldName} are equivalentHowever, ${FieldName}.getValue() doesn’t work for me while @{FieldName} does. (See my second screenshot attachment for the code I used).
My Workaround also required me to unbind the email value to the displayed field.
When both email fields (the hidden one and the displayed one) are bound to the same value, the text formula alters both fields.If you happen to find a better solution which doesn’t require me to use an additional hidden output text feel free to let me know!
With best regards,
Lukas
-
This reply was modified 2 years, 11 months ago by
Lukas Prützel. Reason: attached a picture of the code
-
This topic was modified 3 years ago by
-
|
You must be logged in to reply to this topic.