Localization in email template sent by Kentico forms - kentico

I have developed a form using form builder in Kentico Xperience.
I am using localized strings for the titles and texts of my form components.
For example for a radio button component, I have
which consists of the following localized strings:
It works fine until the form is submitted and sent by email.
The email template is built as follow:
$$label:Participation$$: $$value:Participation$$
But I receive email like:
Participation in meeting: {$Form.Participation.Virtual$}
While I would like to receive the localized text in my email as follow:
Participation in meeting: Virtually
How can I do that? Is there a specific syntax in the email template?

The correct syntax in my email template to obtain what I am looking for is:
$$label:Participation$$: {%Participation%}

The behavior is by design. If you use a compoment with list of options and you add just a localization macro there, there is a risk that chaning the string will cause wrong values. The recommended and supported format is:
value;{$ResourceStringKey$}

Related

Azure Logic App + SendGrid Email link formatting

I have a logic app that is being used to send emails using a SendGrid subscription. There is a unique link sent to each user. I can embed this link variable in the message text using expressions, but when the email is sent it transforms the link to plain text.
There is a "link" button that can be used to manually add a link but it only accepts plain text as the link title and target, it does not appear it can be mapped to any expressions or dynamic content.
I thought I could maybe add a placeholder link through the SendGrid Link insertion, and then find it in the corresponding json template for the app and map it to an expression but something happens when it is saved and it is transformed.
According to some test, it doesn't show same problem in my side. I received the email in outlook and in my opinion, it may be influenced by your email tool. In my side, the link was transformed to plain text only if the email is filtered into Junk Folder.
To solve this problem, you can test it in another email tool. Or you can do it like below screenshot, store the link with <a> tag in a variable and then use the variable in email body.

Render text as HTML in email template Dynamics CRM

I need to send an email using a workflow, either using a template or using the workflow step>>Send Email: Create New Message.
The email must include a data field (Multiple Lines of Text) {!customEntity:Question;} which contains HTML tags. For instance:
Registration number <b>XSA-192034</b><br>
College <b>Private</b><br>
Principal player? <b>No</b>
What can I do to render the HTML tags within the Email template?
Template body looks like:
Hi {!User : Full Name;},
We received the info below from {!Contact:Full Name;}
{!customEntity:Question;}
At the moment is being shown as:
Hi John Clark,
We received the info below from Jason Smith
Registration number <b>XSA-192034</b><br>
College <b>Private</b><br>
Principal player? <b>No</b>
This will not work out of the box. You will have to get rid of your html tags if you wish to use it in Email Template or Workflow (Email).
You will have to use C# or java-scripting for this.
Look at these articles which will guide you furthure.
https://nishantrana.me/2010/03/05/converting-html-to-text-for-email-in-crm/
https://www.crmanswers.net/2013/03/converting-html-e-mail-to-plain-text.html

Is it possible to conditionally display DocuSign template parts/sections?

I would like to know if it is possible to show/hide parts of DocuSign document template depending on the data which is passed in as a request.
I already have document template created and uploaded to DocuSign. I then use templateId to create envelope for that document and I also send some data (as json) to prepopulate certain fields inside the envelope.
The thing I am asking now is:
If the template has, let's say, 3 paragraphs, is it possible to hide one of them completely, based on the passed in json data?
Creating and uploading multiple templates is not an option due to large number of conditionally displayed sections.
I have been reading DocuSign API documentation, but couldn't find an answer to this.
To do that you will have to use Responsive Signing.
This feature change the format of the document you sign from PDF to HTML.
With HTML being the format, there are a lot more things you can do.
For example, you can use what we call "Smart Sections" which is exactly what you want. Sections that can be shown off/on based on logic you set.
Find out more about the responsive signing API here - https://developers.docusign.com/esign-rest-api/guides/responsive-signing/api-overview

sharepoint validate custom field

I cave created a custom list in sharepoint (created and provisioned to the 12 hive)
how can i perform validation on certain fields of the list when a new list item is added?
i think i can do it through the "itemadding" event reciever, but is there a more elegant sharepoint way?
eg i just want to check an email field has a valid email format.
I think you have to options. As you have already mentioned using a event receiver would be one way. But I think a more elegant and above all a more SharePoint like way would be implementing your own custom field type and field control.
This will give you the option to validate the mail address before any event receiver is triggered and to react with an validation message to the user giving him the option to correct his input.
You could go with validation on the client using JQuery if you have the id or a css class on the rendered textbox for the email input.

SharePoint publishing site email encoding/decoding

I'm building a SharePoint (MOSS) publishing site for employee information on my company website. I have an employee content type and am using the Contact E-Mail Address site column to store an employee's email address.
Want I'd like is the ability to encode email addresses at runtime to prevent the real email address from being harvested by spammers. This would be decoded when a user clicks the email hyperlink e.g. the following HTML would be sent to the browser:
Email Jonny
I already have the javascript methods for encoding/decoding a text value from the meaningless string above, but am not too sure as to how to approach this with SharePoint in mind. I'm thinking a custom control and/or custom J-Query?
Any help would be much appreciated!
Jonny
In the case that you are unable to put the users into AD, a custom field control will give you the ability to include the custom rendering (jquery) you require as well as the ability to enter the data as "normal" text.
The custom field, once defined "just works" wherever you need to display the field.
Given you are thinking of using JQuery, the issue then becomes one of making sure the jquery library is correctly linked whenever you need to us a field of this type.
If you make those employees members of the site, SharePoint takes care of this issue.
You can send emails to them, but the email address will only be used at send time, when you add a button to email someone, it will not show the email address, its handled at the backend.
SPUtility.SendEmail(SPContext.Current.Web, false, false,
[SPUser.Email][1], "E-mail title",
"E-mail body");
(source: msdn.com)
Two more options/approaches you can try:
(1) implement a custom TextField control, inheriting from Microsoft.SharePoint.WebControls.TextField and override RenderFieldForDisplay
Then in code - encode the field for display.
Add this control to safecontrols and use this in place of the normal TextField in the pagelayout.
(2) use the existing TextField control, but inject a button [Encode] using jQuery next to the TextField in editmode.
Use the JavaScript encode method to encode what the user has typed into an encoded value, replacing the existing TextField value. Which they can then save to into SharePoint.
I'd rate the approaches based on your deployment scenario - Nat's one is the cleanest but probably more involved for deploying, and the jQuery-only one seems very hackish but easy on deployment. The override TextField approach would probably sit somewhere in the middle.

Resources