0

We want to enrich existing data about customers using a SmartCapture form. So, what we decided is to send an email to the existing customer audience with a link to a CloudPage with the SmartCapture form related to a new & empty data extension in which we would have additional fields such as FirstName, LastName, etc.. Currently, we only have the email address and the FederationID in the campaign audience. Also, as part of the user experience, we would want to pre-populate the email address field and pass the federationID (i.e. Primary Key) as hidden attribute because it does not make sense for the customers to know what their federationID. The end goal is that the SmartCapture form will populate a brand new data extensions (an empty one), and then we would to cross-reference (SQL) the newly enriched data extension with the original audience to which the email was sent via the FederationID. However, I’m stuck. Here’s what I’ve done.

  • Email

    The email to be sent contains the following code I wrote behind the link to the landing page:

    <p>follow the `%%=RedirectTo(CloudPagesURL(985, 'EmailAddress', EmailAddress, 'federationID', federationID))=%%">link
    
  • Cloud Page - SC form settings

    On the Cloud Page, the SmartCapture form, in the settings, it has under "HIDDEN ATTRIBUTES", federationID:

    %%=AttributeValue('federationID')=%%
    

    (so we want to pass federationID as hidden attribute on which we would later on cross-reference the resulting data extensions with the original audience)

  • Email Address as form field (pre-populated)

    While in one of the SC form fields - EmailAddress - it has AMPscript for prepopulating the field (which it works OK):

    value="%%=AttributeValue(' EmailAddress')=%%"
    

Problem:

The problem is that, although when I click on the link in the test email and see that the EmailAddress field is correctly pre-populated, I cannot hit the “Submit” button. In other words, I cannot validate the form (it’s just stuck, I’m not getting the thank-you message), the target data extension is not populated and it seems to me that MC is not passing the federationID value. How to make the form validate with federationID being passed under hidden attribute?

3
  • Have you checked your browser's developer console for any errors/clues? To access it in Chrome, use the keyboard shortcut Cmd+Option+J (Mac) or Ctrl+Shift+J (Windows); in Firefox, use Cmd+Option+K (Mac) or Ctrl+Shift+K (Windows).
    – Mark G
    Jun 4, 2019 at 15:25
  • Have you tried using a CloudPagesURL instead of RedirectTo? developer.salesforce.com/docs/…
    – zuzannamj
    Jun 4, 2019 at 20:41
  • I keep getting the "Failed to load resource: the server responded with a status of 500 (Internal Server Error)". I've tried with several different data extensions with different settings (e.g. one has email address as Primary Key, other has none as PK, etc.) but it's stuck. I tried on another computer and the same thing happens. The only way I could get the SCform to validate was when I selected Cloud Pages default data extension as the source DE.
    – nix9247
    Jun 5, 2019 at 8:18

1 Answer 1

0

I had huge problems with SmartCapture forms with AMPScript inside of it and ended up developing my own form and functions to achieve my goal. What I have experienced was:

  1. Problems with JavaScript Functions when you click a submit element that the function popover shows errors and similar cases. (Watch developer console on browsers when you click the element)
  2. AMPScript variables inside hidden fields get purged once saved and the page is reopened. Making the usability just bad. [You have to enter them again and again and again].
  3. Using forms with JavaScript / JQuery and Post/Get events to other website works better and you are not frustrated when salesforce might change something on the smart capture forms.

I really belief that these smart capture forms are bad implemented when you want to use it with ampscript (to fill initial values).

Hope that helps.

1
  • Brother, I feel your pain. The only problem is that I don't have developers on my payroll to develop a custom form, so I have to work with the cards I've been dealt (from SF). Anyway, I got it to work by creating a brand new collection, new data extension, everything, and writing the same AMPscript code as before. The problem is I did everything the same as the first time, but now it suddenly works. Huge disappointment with this functionality.
    – nix9247
    Jun 6, 2019 at 10:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .