<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sitecore Xperiences &#187; Experience Forms</title>
	<atom:link href="https://blog.peplau.com.br/category/experience-forms/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.peplau.com.br</link>
	<description>The things I&#039;ve seen as a Sitecore Professional</description>
	<lastBuildDate>Sun, 09 Mar 2025 21:54:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>Sitecore 10.1 Form Send E-mail VS Community Send E-mail</title>
		<link>https://blog.peplau.com.br/sitecore-10-1-form-send-e-mail-vs-community-send-e-mail/</link>
		<comments>https://blog.peplau.com.br/sitecore-10-1-form-send-e-mail-vs-community-send-e-mail/#comments</comments>
		<pubDate>Tue, 30 Mar 2021 20:07:32 +0000</pubDate>
		<dc:creator><![CDATA[Rodrigo Peplau]]></dc:creator>
				<category><![CDATA[Experience Forms]]></category>
		<category><![CDATA[Sitecore Community]]></category>
		<category><![CDATA[Sitecore Modules]]></category>

		<guid isPermaLink="false">http://blog.peplau.com.br/?p=846</guid>
		<description><![CDATA[<div class="lr_horizontal_share" data-share-url="https://blog.peplau.com.br/sitecore-10-1-form-send-e-mail-vs-community-send-e-mail/"></div>Experience Forms debuted in 2017 with the Initial Release of Sitecore 9.0. With the mission to replace &#8220;Webforms For Marketers&#8221; (WFFM), it started pretty small. Lots of features were not available in the beginning, some of them taking several years to arise. To be precise, part of the community still thinks it has a long [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Experience Forms debuted in 2017 with the Initial Release of Sitecore 9.0. With the mission to replace &#8220;Webforms For Marketers&#8221; (WFFM), it started pretty small. Lots of features were not available in the beginning, some of them taking several years to arise.</p>
<p>To be precise, <a href="https://twitter.com/jammykam/status/1370023523742326784" target="_blank">part of the community still thinks it has a long road to catch up with WFFM</a>…</p>
<p><img class=" aligncenter" src="http://gif.co/xxyg.gif" alt="" width="543" height="434" /></p>
<h2>Sending Email Messages with Experience Forms</h2>
<p>One of the biggest gaps was the “Send Email Message” action, not present until very recently in Sitecore 10.1. For more than 3 years, the only supported way was the EXM integration, <a href="https://joaoneto.blog/tutorial-send-email-based-on-field-value-using-exm-forms-and-marketing-automation" target="_blank">as my friend João Neto explains in this post</a>.</p>
<p>Noticed the gap, <a href="https://www.nishtechinc.com/Blog/2018/April/Send-E-mail-Action-to-Sitecore-9-Forms" target="_blank">I implemented a free module to provide the community with this feature</a>. Until these days, this is still my most popular module.</p>
<p>But what are the similarities and differences between the two actions? Today, I take a deep dive into the new feature and compare it with my community module.</p>
<p>&nbsp;</p>
<h2>Installation and Configuration</h2>
<p>The new official action comes out-of-the-box. This is convenient compared to external modules: no packages to install. An advantage to Sitecore!</p>
<p>In both cases, you&#8217;ll need to fill the SMTP settings with a configuration patch file. You can use <a href="https://bitbucket.org/nishtechinc/formssendmail/src/master/FormsSendMail/App_Config/Include/smtp.config" target="_blank">the same patch from my module</a>, with localhost settings – Counterstrike!</p>
<p>&nbsp;</p>
<h2>User Interface</h2>
<p>The new action has a nice GUI to configure the action, enabling content editors to write messages in a nice way.</p>
<p><a href="http://blog.peplau.com.br/wp-content/uploads/01-New-UI.png"><img class="alignnone size-full wp-image-848" src="http://blog.peplau.com.br/wp-content/uploads/01-New-UI.png" alt="01 - New UI" width="955" height="478" /></a></p>
<p>I have to admit, this is much better than having to edit e-mail the templates beforehand.</p>
<p><a href="http://blog.peplau.com.br/wp-content/uploads/02-Old-Module-UI.png"><img class="alignnone wp-image-849" src="http://blog.peplau.com.br/wp-content/uploads/02-Old-Module-UI-1024x509.png" alt="02 - Old Module UI" width="1024" height="509" /></a></p>
<p>&nbsp;</p>
<p>The new GUI also provides token selection, so now you don&#8217;t have to remember the exact field names.</p>
<p><a href="http://blog.peplau.com.br/wp-content/uploads/03-Token-selection.png"><img class="alignnone size-full wp-image-850" src="http://blog.peplau.com.br/wp-content/uploads/03-Token-selection.png" alt="03 - Token selection" width="335" height="282" /></a></p>
<p>Well, well… looks like the team in charge of this implementation worked very hard!  <img src="https://blog.peplau.com.br/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="wp-smiley" /></p>
<p>&nbsp;</p>
<h2>Keyword replacement with Form Data</h2>
<p>Both actions use the same strategy for data replacement, with field named tokens that are replaced with the respective form data. Sitecore uses the [fieldname] format, while the community uses {fieldname}, which is practically the same.</p>
<p>But again, when it comes to the new GUI and the ability to visually select your tokens from the form fields, the new action is much superior for content editors.</p>
<h3>Keyword replacement oddities</h3>
<p>There are still some oddities with keyword replacement, that could be easy fixes. Who knows if Sitecore will ever get back to this simple, but very important feature? They should.</p>
<h4>No replacement allowed with e-mail fields</h4>
<p>It feels strange that none of the e-mail fields (To, Cc, Bcc, and From) can use token replacement. This makes it impossible to send messages using addresses collected in a form.</p>
<p><a href="http://blog.peplau.com.br/wp-content/uploads/04-Email-fields.png"><img class="alignnone size-full wp-image-851" src="http://blog.peplau.com.br/wp-content/uploads/04-Email-fields.png" alt="04 - Email fields" width="901" height="181" /></a></p>
<p>The “From” field is even more limited, as it does not allow to type e-mail addresses. Instead, the editor should select the submitter in a dropdown. To add new submitters to the list, you have to create new items under the following path:</p>
<blockquote><p>/sitecore/system/Settings/Forms/Meta Data/Address Book/Senders</p></blockquote>
<p>This is a serious limitation: the community module allows tokens in any field. This feature is crucial when you want to send emails to (and from) addresses collected in the form. You can&#8217;t send a message to the submitted address, or to the right department as selected in a dropdown field.</p>
<h4>Defective replacement with the Subject field</h4>
<p>Testing the new action, my first submission failed without any visual feedback. The log file showed this curious message:</p>
<blockquote><p>ERROR [Experience Forms]: The specified string is not in the form required for a subject.</p></blockquote>
<p>This started to make more sense when you look at the way I configured the subject:<a href="http://blog.peplau.com.br/wp-content/uploads/05-Subject-setup.png"><img class="alignnone size-full wp-image-852" src="http://blog.peplau.com.br/wp-content/uploads/05-Subject-setup.png" alt="05 - Subject setup" width="246" height="64" /></a></p>
<p>And the content of the &#8220;Multi” field when I submitted this form:</p>
<p><a href="http://blog.peplau.com.br/wp-content/uploads/06-Subject-in-a-MultiList-field.png"><img class="alignnone size-full wp-image-853" src="http://blog.peplau.com.br/wp-content/uploads/06-Subject-in-a-MultiList-field.png" alt="06 - Subject in a MultiList field" width="229" height="94" /></a></p>
<p>It worked fine when I removed the line breaks, so this bug is due to them. This would be an easy fix for future releases. Keep this in mind when you use tokens in the subject, and you will save some precious debugging time!</p>
<p>&nbsp;</p>
<h2>Compatibility</h2>
<p>The new action is only available from Sitecore 10.1 and higher. The community module is still the easiest way to submit e-mails from 9.0 to 10.0, which ensures its relevancy. At least until most of the Sitecore instances are 10.1+. A good clue is the end of mainstream support, found at the <a href="https://support.sitecore.com/kb?id=kb_article_view&amp;sysparm_article=KB0641167" target="_blank">Sitecore Product Support Lifecycle</a>:</p>
<table class="table table-striped table-hover table-bordered table-sm ">
<thead>
<tr>
<th scope="col">Product</th>
<th scope="col">Mainstream Support End Date</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Sitecore 10.0</th>
<td>31-Dec-2023</td>
</tr>
<tr>
<th scope="row">Sitecore 9.3</th>
<td>31-Dec-2022</td>
</tr>
<tr>
<th scope="row">Sitecore 9.2</th>
<td>31-Dec-2022</td>
</tr>
<tr>
<th scope="row">Sitecore 9.1</th>
<td>31-Dec-2021</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<h2>Full comparison table</h2>
<p>If you reached the end of this article and are still unsure, here is a “very unbiased” comparison table:</p>
<table class="table table-striped table-hover table-bordered table-sm " style="width: 100%;">
<thead>
<tr>
<th scope="col"></th>
<th scope="col">Sitecore’s Send Email</th>
<th scope="col">Community’s Send Email</th>
</tr>
</thead>
<tbody>
<tr>
<th style="text-align: center;" scope="row">Installation</th>
<td style="text-align: center;"><img class="alignnone" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Star_rating_5_of_5.png/799px-Star_rating_5_of_5.png" alt="" width="117" height="25" /><br />
Out of the box</td>
<td style="text-align: center;"><img class="alignnone" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Star_rating_4_of_5.png/800px-Star_rating_4_of_5.png" alt="" width="127" height="27" /><br />
Installable module</td>
</tr>
<tr>
<th scope="row">Configuration</th>
<td style="text-align: center;"><img class="alignnone" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Star_rating_5_of_5.png/799px-Star_rating_5_of_5.png" alt="" width="117" height="25" /><br />
Configuration file</td>
<td style="text-align: center;"><img class="alignnone" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Star_rating_5_of_5.png/799px-Star_rating_5_of_5.png" alt="" width="117" height="25" /><br />
Configuration file</td>
</tr>
<tr>
<th scope="row">User Interface</th>
<td style="text-align: center;"><img class="alignnone" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Star_rating_5_of_5.png/799px-Star_rating_5_of_5.png" alt="" width="117" height="25" /><br />
Amazing GUI</td>
<td style="text-align: center;"><img class="alignnone" src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Star_rating_3_of_5.png/800px-Star_rating_3_of_5.png" alt="" width="127" height="27" /><br />
Content Editor</td>
</tr>
<tr>
<th scope="row">Form Data Replacement</th>
<td style="text-align: center;"><img class="alignnone" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Star_rating_4_of_5.png/800px-Star_rating_4_of_5.png" alt="" width="127" height="27" /><br />
Replacement oddities</td>
<td style="text-align: center;"><img class="alignnone" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Star_rating_5_of_5.png/799px-Star_rating_5_of_5.png" alt="" width="117" height="25" /><br />
Total freedom</td>
</tr>
<tr>
<th scope="row">Compatibility</th>
<td style="text-align: center;">Sitecore 10.1 and above</td>
<td style="text-align: center;">Sitecore 9 and above</td>
</tr>
<tr>
<th scope="row">Developer is awesome</th>
<td style="text-align: center;">Yes</td>
<td style="text-align: center;">Yes</td>
</tr>
<tr>
<th scope="row">Developer can sing</th>
<td style="text-align: center;">No</td>
<td style="text-align: center;">Yes</td>
</tr>
</tbody>
</table>
<p>I think it&#8217;s a draw!</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.peplau.com.br/sitecore-10-1-form-send-e-mail-vs-community-send-e-mail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(Bug-free) Custom Form IDs in Sitecore Forms</title>
		<link>https://blog.peplau.com.br/bug-free-custom-form-ids-in-sitecore-forms/</link>
		<comments>https://blog.peplau.com.br/bug-free-custom-form-ids-in-sitecore-forms/#comments</comments>
		<pubDate>Mon, 06 Jul 2020 19:41:50 +0000</pubDate>
		<dc:creator><![CDATA[Rodrigo Peplau]]></dc:creator>
				<category><![CDATA[Experience Forms]]></category>

		<guid isPermaLink="false">http://blog.peplau.com.br/?p=832</guid>
		<description><![CDATA[<div class="lr_horizontal_share" data-share-url="https://blog.peplau.com.br/bug-free-custom-form-ids-in-sitecore-forms/"></div>Some time ago I was challenged by one requirement need from the marketing team, related to the Sitecore Forms that we put together for them. In order to do a better event tracking with Google Tag Manager, we had to give the power for Content Editor to customize the form ID. Instead of a hard to read string, composed [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Some time ago I was challenged by one requirement need from the marketing team, related to the Sitecore Forms that we put together for them.</p>
<p>In order to do a better event tracking with Google Tag Manager, we had to give the power for Content Editor to customize the form ID. Instead of a hard to read string, composed by concatenations of the form and the session Guids, we should enable any kind of arbitrary string to be configured.</p>
<p>Speaking to my long time friend and Hackathon partner <a href="https://twitter.com/netoJoao87" target="_blank">Joao Neto</a>, who is great with Experience Forms, he put together <a href="https://joaoneto.blog/2020/01/07/sitecore-forms-how-to-change-the-id-attribute/" target="_blank">this solution</a>. What amazing friend hu? Joao&#8217;s solution does the trick as the marketing team requested, but introduced a 500 error that was affecting the Google ranking &#8211; and that, as we know, is also something that marketers love to hate.</p>
<p>So I was provided with the time necessary to investigate and fix this error and now share it with our community.</p>
<h2>The error</h2>
<p>The forms with custom IDs will trigger 500 errors when doing the field tracking &#8211; which happens when you fill a field and move to the next field by pressing TAB.</p>
<p>These errors are not visible to final users, they occur behind the scenes and can potentially affect your search ranking. You can see them happening by using tools like Fiddler or Developer Tools.</p>
<p>The errors are also tracked as Error Interactions of your current Contact:</p>
<p><a href="http://blog.peplau.com.br/wp-content/uploads/Error-500-on-Sitecore-Forms1.png"><img class="alignnone size-full wp-image-841" src="http://blog.peplau.com.br/wp-content/uploads/Error-500-on-Sitecore-Forms1.png" alt="Error 500 on Sitecore Forms" width="735" height="228" /></a></p>
<h2>Why it breaks?</h2>
<p>The issue happens because there are some native Javascript that uses the Form ID to extract the Session Id. Since we have modified the Form ID, then this code will fail, causing the issue.</p>
<h2>The fix</h2>
<p>In order to fix this issue, we will store the original form ID as another attribute in the form, then change the defective javascript to take from that attribute instead of the Form ID itself.</p>
<p>&nbsp;</p>
<h3>STEP 1 &#8211; Save the original ID</h3>
<p>Looking back to Joao&#8217;s code, the class that we need to modify is &#8220;<span class="pl-en">SetFormId</span>&#8220;.</p>
<p>Modify the line 34 adding the following two lines, before assigning the customId to the form:</p>
<pre><strong>if (!args.Attributes.ContainsKey("originalId"))</strong>
<strong>   args.Attributes.Add("originalId",args.FormHtmlId);</strong>
// Setup custom form ID
args.FormHtmlId = customId;
</pre>
<p>&nbsp;</p>
<h3>STEP 2 &#8211; Change the JS file to pick from that attribute</h3>
<p>The following native JS must be changed: <em>/sitecore%20modules/Web/ExperienceForms/scripts/form.tracking.js</em></p>
<p>The method &#8220;getSessionId&#8221; must be modified to the following code:</p>
<pre>function getSessionId(form) {
   var formId = form[0].id;
<strong>   // The fix starts here</strong>
<strong>   if ($jq(form[0]).attr("originalId")!==undefined)</strong>
<strong>      formId = $jq(form[0]).attr("originalId");</strong>
<strong>   // The fix ends here</strong>
   var targetId = formId.slice(0, -(formId.length - formId.lastIndexOf("_") - 1)) + "FormSessionId";
   var element = form.find("input[type='hidden'][id=\"" + targetId + "\"]");
   return element.val();
}

</pre>
]]></content:encoded>
			<wfw:commentRss>https://blog.peplau.com.br/bug-free-custom-form-ids-in-sitecore-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Malformed querystring breaks Sitecore Experience Forms (Value cannot be null. Parameter name: key)</title>
		<link>https://blog.peplau.com.br/value-cannot-be-null-parameter-name-key-malformed-querystring-breaks-sitecore-experience-forms/</link>
		<comments>https://blog.peplau.com.br/value-cannot-be-null-parameter-name-key-malformed-querystring-breaks-sitecore-experience-forms/#comments</comments>
		<pubDate>Wed, 05 Feb 2020 22:00:09 +0000</pubDate>
		<dc:creator><![CDATA[Rodrigo Peplau]]></dc:creator>
				<category><![CDATA[Experience Forms]]></category>
		<category><![CDATA[Sitecore 9]]></category>

		<guid isPermaLink="false">http://blog.peplau.com.br/?p=805</guid>
		<description><![CDATA[<div class="lr_horizontal_share" data-share-url="https://blog.peplau.com.br/value-cannot-be-null-parameter-name-key-malformed-querystring-breaks-sitecore-experience-forms/"></div>We noticed a bug in Sitecore Experience Forms 9.0.2: when you access a page that has a form passing wrong query string parameters, the system responds with a Runtime Error. The Error&#8230; For instance, the following url: ==&#62; http://local.myclient.com/myform?good=1&#38;bad Because the query string parameter &#8220;bad&#8221; does not have a corresponding value, accessing this page will result in a error [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>We noticed a bug in Sitecore Experience Forms 9.0.2: when you access a page that has a form passing wrong query string parameters, the system responds with a Runtime Error.</p>
<h2>The Error&#8230;</h2>
<p>For instance, the following url:<br />
==&gt; http://local.myclient.com/myform?good=1<strong>&amp;bad</strong></p>
<p>Because the query string parameter &#8220;bad&#8221; does not have a corresponding value, accessing this page will result in a error like this:</p>
<h1>Server Error in &#8216;/&#8217; Application.</h1>
<hr size="1" width="100%" />
<h2><i>Value cannot be null.<br />
Parameter name: key</i></h2>
<p><span style="font-family: Arial, Helvetica, Geneva, SunSans-Regular, sans-serif;"><b>Description: </b>An unhandled exception occurred.</span></p>
<p><b>Exception Details: </b>System.ArgumentNullException: Value cannot be null.<br />
Parameter name: key</p>
<p><b>Source Error:</b></p>
<table width="100%" bgcolor="#ffffcc">
<tbody>
<tr>
<td><code>An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code></td>
</tr>
</tbody>
</table>
<p><span style="font-family: Arial, Helvetica, Geneva, SunSans-Regular, sans-serif;"><br />
<b>Stack Trace:</b><br />
</span></p>
<table width="100%" bgcolor="#ffffcc">
<tbody>
<tr>
<td>
<pre>[ArgumentNullException: Value cannot be null.
Parameter name: key]
   System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) +49
   System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +14789605
   System.Linq.Enumerable.ToDictionary(IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer) +283
   Sitecore.ExperienceForms.Mvc.Pipelines.RenderForm.SetFormParameters.Process(RenderFormEventArgs args) +639
   (Object , Object ) +14
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +236
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +195
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args, Func`2 resultGetter) +161
   Sitecore.ExperienceForms.Mvc.Html.HtmlExtensions.BeginRenderRouteForm(HtmlHelper htmlHelper, FormViewModel model, Boolean isPost) +301
   ASP._Views_FormBuilder_Form_cshtml.Execute() in D:\Git\ADMI\src\Feature\ADMI.Jobs\Forms\code\obj\CodeGen\Views\FormBuilder\Form.cshtml:6
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +148
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +375
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +88
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +775
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +775
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +775
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +81
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +701
</pre>
</td>
</tr>
</tbody>
</table>
<p><b>Version Information:</b> Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3282.0</p>
<hr />
<p>&nbsp;</p>
<h2>&#8230;The root cause&#8230;</h2>
<p>Decompiling the &#8220;Sitecore.ExperienceForms.Mvc.dll&#8221; shows exactly where the issue happens: one of the processors at the &lt;forms.renderForm&gt;, more precisely the &#8220;Sitecore.ExperienceForms.Mvc.Pipelines.RenderForm.SetFormParameters&#8221; processor, is missing a simple null check.</p>
<p>&nbsp;</p>
<h2>&#8230;And the fix!</h2>
<p>Of course, I have tried to extend the original class, to apply my fix in a more &#8220;surgical&#8221; way. However, due to a private property, we will need to re-implement the whole class.</p>
<p>The fix is very simple and will only require a class and a config patch.</p>
<h3>STEP 1 &#8211; Create the new SetFormParameters processor</h3>
<p>Here is how your processor class should look like. The code is fully commented to show exactly what has been modified and what is simply copied/pasted from the original class.</p>
<pre>using System.Collections.Generic;
using System.Linq;
using System.Web.Routing;
using Sitecore.Diagnostics;
using Sitecore.ExperienceForms;
using Sitecore.ExperienceForms.Mvc.Pipelines.RenderForm;
using Sitecore.Mvc.Configuration;
using Sitecore.Mvc.Pipelines;

namespace MyProject.Pipelines.Forms
{
 /// &lt;summary&gt;
 /// Pipeline that implements a fix for Sitecore.ExperienceForms.Mvc.Pipelines.RenderForm.SetFormParameters
 /// The fix is basically a null check in a LINQ expression, but due to a private property
 /// we are forced to re-implement the whole class in order apply the fix
 /// &lt;/summary&gt;
 public class SetFormParameters : MvcPipelineProcessor&lt;RenderFormEventArgs&gt;
 {
    /// &lt;summary&gt;
    /// This is the private property that we need to re-implement
    /// &lt;/summary&gt;
    private readonly IQueryStringProvider _queryStringProvider;

    /// &lt;summary&gt;
    /// Constructor is identical to the original class
    /// &lt;/summary&gt;
    /// &lt;param name="queryStringProvider"&gt;&lt;/param&gt;
    public SetFormParameters(IQueryStringProvider queryStringProvider)
    {
       Assert.ArgumentNotNull((object) queryStringProvider, nameof (queryStringProvider));
       this._queryStringProvider = queryStringProvider;
    }

    /// &lt;summary&gt;
    /// This is where the fix is applied - whole method is identical to original
    /// except for the LINQ expression in the end of the file
    /// &lt;/summary&gt;
    /// &lt;param name="args"&gt;&lt;/param&gt;
    public override void Process(RenderFormEventArgs args)
    {
       Assert.ArgumentNotNull((object) args, nameof (args));
       args.FormHtmlId = args.HtmlHelper.AttributeEncode(args.HtmlHelper.ViewData.TemplateInfo.GetFullHtmlFieldId(args.ViewModel.ItemId));
       args.Attributes = new Dictionary&lt;string, object&gt;()
       {
          {
             "enctype",
             (object) "multipart/form-data"
          },{
             "id",
             (object) args.FormHtmlId
          },{
             "data-sc-fxb",
             (object) args.ViewModel.ItemId
          }
       };
       if (!string.IsNullOrEmpty(args.ViewModel.CssClass))
          args.Attributes.Add("class", args.ViewModel.CssClass);
       args.QueryString = new RouteValueDictionary(
          _queryStringProvider.QueryParameters.AllKeys
             .Where(p=&gt;p!=null) // &lt;--- The fix itself is here
             .ToDictionary(key =&gt; key,
                key =&gt; (object) _queryStringProvider.QueryParameters[key]));
                args.RouteName = MvcSettings.SitecoreRouteName;
    }
 }
}

</pre>
<h3>STEP 2 &#8211; Register your processor to make it load instead of the original one</h3>
<p>And of course, let&#8217;s register the processor using the following config patch:</p>
<pre>&lt;configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"&gt;
 &lt;sitecore&gt;
 
 &lt;forms.renderForm&gt;
 &lt;processor type="MyProject.Pipelines.Forms.SetFormParameters, MyProject" resolve="true" 
 patch:instead="processor[@type='Sitecore.ExperienceForms.Mvc.Pipelines.RenderForm.SetFormParameters, Sitecore.ExperienceForms.Mvc']"/&gt;
 &lt;/forms.renderForm&gt;

 &lt;/pipelines&gt;
 &lt;/sitecore&gt;
&lt;/configuration&gt;</pre>
<p>&nbsp;</p>
<h2>Is this officially recognized as a bug?</h2>
<p>Yes, it a known bug, registered with the public reference number 324457 (More information about public reference numbers can be found here: <a href="https://kb.sitecore.net/articles/853187">https://kb.sitecore.net/articles/853187</a>)</p>
<p>This bug was resolved in <strong>Sitecore 9.3</strong>, as can be seen in the release notes:<br />
<a href="https://dev.sitecore.net/Downloads/Sitecore%20Experience%20Platform/93/Sitecore%20Experience%20Platform%2093%20Initial%20Release/Release%20Notes">https://dev.sitecore.net/Downloads/Sitecore%20Experience%20Platform/93/Sitecore%20Experience%20Platform%2093%20Initial%20Release/Release%20Notes</a></p>
<p>&nbsp;</p>
<blockquote><p>&#8220;​​​​If you use a query string that contains parameter without a value to open a page that contains a form, the form is not rendered​.&#8221;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>https://blog.peplau.com.br/value-cannot-be-null-parameter-name-key-malformed-querystring-breaks-sitecore-experience-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
