Rules with specific conditions may not work for web form fields


Description

When creating forms using the Web Forms for Marketers module 2.0 -.8.2.0 versions, it is possible to configure different rules for the form fields. Such rules can be used for hiding specific fields, setting field default values, etc.

However, the rules may not work when using the conditions from the Item Information group, specifically the following ones:

For example, the following rule will not hide the field when rendering the form on the Home item:

where the item name is equal to Home
hide element

Solution

Apply the following patch to resolve the issue:

  1. Copy the Sitecore.Support.401148.dll assembly into the /bin folder of your solution.
  2. Change the Type field of the following items in the master database as specified below:
    • /sitecore/system/Settings/Rules/Definitions/Elements/Item Information/Item ID:
      Sitecore.Support.Rules.Conditions.ItemConditions.ItemIdCondition,Sitecore.Support.401148
    • /sitecore/system/Settings/Rules/Definitions/Elements/Item Information/Item Name:
      Sitecore.Support.Rules.Conditions.ItemConditions.ItemNameCondition,Sitecore.Support.401148
    • /sitecore/system/Settings/Rules/Definitions/Elements/Item Information/Item Template:
      Sitecore.Support.Rules.Conditions.ItemConditions.WhenTemplateIs,Sitecore.Support.401148
  3. Publish the changes.