Skip to main content

Posts

Showing posts with the label forms

Sitecore 9 Forms :  Alphanumeric Captcha

Sitecore 9 Forms :  Alphanumeric Captcha As you know Recaptcha is not available on Sitecore 9.0.1 and Sitecore 9.0.2 forms, so I thought to create custom Google Recaptcha but my issue was Google Recaptcha was not working properly on Internet Explorer as it was asking 10 to 15 times to verify which is very frustrating, at the same time it was working for another browser so I thought to create custom Alphanumeric captcha as per client requirement. In previous blog, we have checked how to create Google reCaptcha field. Now we are going to create Alphanumeric Captcha using below steps: Create new viewmodel class AlphaNumericViewModel.cs [Serializable()]     public class AlphaNumericViewModel : StringInputViewModel     {         protected override void InitItemProperties(Item item)         {           ...

Save contacts into List using Marketing automation and Forms

Save contacts into List using Marketing automation and Forms   Marketing automation is a very powerful tool of Sitecore, it provides a facility to create an automated online campaign with a user-friendly drag and drop interface. You can use Marketing automation to add contacts into List from Sitecore 9 Forms instead to create new custom submit action. In this blog, we are going to trigger goal on form and using Marketing automation we are going to add contacts into list when the goal will be a trigger. Prerequisites Create one Goal let’s say “ FormGoalTrigger ” and deploy it. You can refer this link to create Goal. Go to List Manager and create “ Empty Contact List ” with name “ FormList ”. You can refer this list to create List. To save contacts into List, contact must be in xDB, this can be done to create custom submit action to update contact using First Name, Last Name ,and Email. You can take reference from here https://doc.sitecore.com/developers/91/site...

Sitecore 9 Forms: Robot detection

Sitecore 9 Forms: Robot detection As you know Sitecore 9 does not provide “Update Contact details” out of box but Sitecore is providing code for that which you can find from here In my current project, I am using Sitecore 9.0.2 and using the same code which Sitecore is providing for Update Contact. Recently I faced an issue where the form is getting spammed.  After some investigation, I found IsRobot function which is a helper method of Sitecore.Analytics.Pipelines.ClassificationStrategy.ContactClassification class.  This helper methods take the contact classification as a parameter and return a Boolean value which indicates whether the contact is a robot or not. public static bool IsRobot(int classification); Below is a code of UpdateContact: namespace Sitecore.ExperienceForms.Samples.SubmitActions { /// <summary> /// Submit action for updating <see cref="PersonalInformation"/> and <see cref="EmailAddressList"/...

Sitecore 9 Forms: Google reCaptcha field

Sitecore 9 Forms: Google reCaptcha field  Re-Captcha is the most important part of any form’s submission. Google reCaptcha run internet bot detector and determined whether a user is a bot or not.  Sitecore Forms does not provide Google reCaptcha field, which was available in WFFM before, so I have created my custom Google reCaptcha.   Below you can find step by step process to create Google reCaptcha field. Create patch config for reCaptcha Sitekey and SecretKey <?xml version="1.0"?> <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/"> <sitecore> <settings> <setting name="ReCaptchaSiteKey" value="site-key" /> <setting name="ReCaptchaSecretKey" value="secret-key" /> </settings> </sitecore> </configuration> Create new viewmodel class RecaptchaViewMode...