This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<xamlControls | |
xmlns:x="http://www.sitecore.net/xaml" | |
xmlns:ajax="http://www.sitecore.net/ajax" | |
xmlns:asp="http://www.sitecore.net/microsoft/webcontrols" | |
xmlns:html="http://www.sitecore.net/microsoft/htmlcontrols"> | |
<ContactFacetDialog x:inherits="TheCodeAttic.SharedSource.WFFM.PopulateFieldAction.Sheer.ContactFacetDialog,TheCodeAttic.SharedSource.WFFM.PopulateFieldAction"> | |
<Sitecore.Controls.DialogPage runat="server" > | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Step 1:Using Statements | |
using Sitecore.Analytics; | |
using Sitecore.Analytics.Model.Entities; | |
using Sitecore.Diagnostics; | |
using Sitecore.Forms.Core.Rules; | |
using System.Linq; | |
//Step 2: Basic Code Structure | |
namespace TheCodeAttic.SharedSource.WFFM.PopulateFieldAction | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Assert.IsNotNull((object)Tracker.Current, "Tracker.Current"); | |
Assert.IsNotNull((object)Tracker.Current.Contact, "Tracker.Current.Contact"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch (this.Name.ToLower()) | |
{ | |
case "first name": | |
retValue = Tracker.Current.Contact.GetFacet<IContactPersonalInfo>("Personal").FirstName; | |
break; | |
case "last name": | |
retValue = Tracker.Current.Contact.GetFacet<IContactPersonalInfo>("Personal").Surname; | |
break; | |
case "email": | |
IContactEmailAddresses ea = Tracker.Current.Contact.GetFacet<IContactEmailAddresses>("Emails"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Sitecore.Forms.Core.Rules; | |
namespace TheCodeAttic.SharedSource.WFFM.PopulateFieldAction | |
{ | |
public class ActionTemplate<T> : ReadValue<T> where T : ConditionalRuleContext | |
{ | |
protected override object GetValue() | |
{ | |
string retVal = string.Empty; | |
/// This value is inherited from ReadValue<T>. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--NOTE: Before use be sure to rename to '.config' Using the XML extension to provide better visual formatting.--> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<settings> | |
<!-- Set it to "true" if you want use the SMTP settings below. | |
You should purchase the right of using the "UseLocalMTA" setting first. --> | |
<setting name="UseLocalMTA"> | |
<patch:attribute name="value">true</patch:attribute> | |
</setting> |
NewerOlder