Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks

SMFC TIP | How to handle form submission

SFMC tips and tricks

On many occasions when handling any form submission single cloud page application is used. This is great as all of error handling, form submission and processing is on one page so it is actually simpler to implement. But here are some thing you need to take into consideration.

Handle GET form submissions

I have seen lots of cloud pages made in a way that i could easily submit the form via the get request.

%%[
SET @submit =  RequestParameter("submit")
IF  NOT EMPTY(@submit) THEN
	//process the form
END IF
]%%

You can easily submit the form with the url parameters:

example.com?submit=22

This can be avoided by asking if the request is POST

<script runat="server">
    Platform.Load("core","1.1.1");
    Variable.SetValue('@request', Platform.Request.Method);
</script>
%%[
SET @submit =  RequestParameter("submit")
IF  NOT EMPTY(@submit) AND @request == "POAST" THEN
	//process the form
END IF
]%%

Accidental form resubmission

When form is processed you want to show user that the information has been successfully saved. You somehow refresh the page and resubmit the form again. This can be easily solved by redirecting user after form has been successfully saved to another success cloud page

SET @successPage = 333 //success page id
IF  NOT EMPTY(@submit) AND @request == "POAST" THEN
	//process the form
	Redirect(CloudPagesURL(@successPage, 'param','value')) 
END IF

Another possible enhancements that can be done to our cloud page form submission is to add recaptcha

Oh hi there đź‘‹
I have a FREE e-book for you.

Sign up now to get an in-depth analysis of Adobe and Salesforce Marketing Clouds!

We don’t spam! Read our privacy policy for more info.

Marcel Szimonisz
Marcel Szimonisz
MarTech consultant As a marketing automation consultant, I specialize in solving problems, automating processes, and driving innovation in my clients' marketing platforms.

I hold certifications in Adobe Campaign v6 (3x certified) and Salesforce Marketing Cloud (5x certified).

Additionally, I serve as a community advisor for Adobe Campaign, offering expert insights and guidance.

In addition to my professional pursuits, I also enjoy exploring various programming languages, CMSs, and frameworks, further enhancing my technical expertise and staying at the forefront of industry advancements.
Take a look at our subscription offering in case you are looking for a Marketing Automation Consultant.

Leave a comment

Your email address will not be published. Required fields are marked *

Similar posts that you may find useful

SFMC tips and tricks
Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks

The Power of Send Logging in Salesforce Marketing Cloud

1 minute read

Send logging in Salesforce Marketing Cloud is a feature that allows you to track the delivery, open, click, and other engagement metrics for the emails that you send from your account. This feature helps you to gain insights into the performance of your email campaigns and optimize them for better results. When you enable send […]

Continue reading
Adobe Campaign Classic Automate Publishing File Resources With Workflow
Adobe Campaign, Marketing Automation

Automate publishing file resources with workflow

2 minutes read

Sometimes, you will reach a point where you want to upload file resources from a script. Although there are hints on the Experience League, even with those, this problem has caused me some troubles. However, challenges and troubles are what I seek. I have decided to map this functionality, which can become handy once in […]

Continue reading
Adobe campaign tips and tricks
ACC Tips & Tricks, Adobe Campaign, Marketing Automation

Escalate any user rights to admin

1 minute read

Normally web apps run under the web app user (which is anonymous and has very little to zero rights by default) and for certain operations you would need to require to grant additional access, or even grant full admin. To grant full admin for web app user is not solution to go with. Instead I […]

Continue reading
SFMC consent management
Marketing Automation, Salesforce Marketing Cloud

Consent management in SFMC explained

6 minutes read

Even after a couple of years working with Salesforce Marketing Cloud, I am still somewhat lost on how the consent management works. I’ve decided to tackle all the uncertainties I’ve been avoiding since I first started. Let’s dive into this topic and resolve all doubts once and for all. As you might have noticed, there […]

Continue reading
Adobe Campaign Classic tips
ACC Tips & Tricks, Adobe Campaign, Marketing Automation

Sending SMS with Unicode Characters in adobe campaign

1 minute read

Are you planning to send SMS messages with Unicode characters? If so, you may be wondering why your messages are split into multiple messages even though they don’t exceed the character limit. Here’s what you need to know about sending SMS messages with Unicode characters. What are Unicode Characters? Unicode is a character encoding standard […]

Continue reading