Checkboxes on pardot custom form handler aren’t saving. Did you forget the []?

So you’ve built a spiffy custom form and are trying to make use of the really cool feature of pardot where checkbox values can cause a prospect to be added to newsletters without using precious automations only its not saving your data OR its only saving one entry.

I am writing this post because when searching for this answer I litterally found nothing about this specific gotcha.

Lets start by establishing a new custom prospect field (Admin -> Configure Fields -> Prospect Fields)

When creating your multi-select or checkbox HTML, you’ll need the “value” info each label. In this example; that’s “social-studies-newsletter-dynamic” and “leadership-newsletter”
These will be the values of your multi-select options or checkboxes.

So lets build a custom form handler to make use of our new custom prospect field.
(Marketing -> Forms -> Custom Form Handlers)

Lets click the edit button on that newsletters field.

That external field name… that is exactly what should appear in your custom HTML form. Exactly.

<html>
    <body>
        <form action="https://pardot.example.test/l/999999/2022-02-04/99wtfm" method="post">
            <label>Email
                <input name="email" type="text" value=""/>
            </label>
            <label>social-studies-newsletter-dynamic
                <input name="newsletters[]" type="checkbox" value="social-studies-newsletter-dynamic"/>
            </label>
            <label>leadership-newsletter
              <input name="newsletters[]" type="checkbox" value="leadership-newsletter"/>
            </label>
            <input type="submit" />
        </form>
    </body>
</html>

The most important thing on this page is the [] at the end of the field name. This is what allows your browser to send more than one value for a given selection. If you by chance made a field of type checkbox or multiselect and didn’t NAME the form field correctly, you won’t get all the selected options.

This is absolutly bat shit crazy to expect marketing folks to pick up on this menuta of implementing a custom HTML form. It doesn’t appear to be documented anywhere in salesforces epic amount of documentation and it really pissed this person off too.
Saddly Polymath didn’t write that post on checkboxes.

Hopefully this solved your problem.

Debugging git push/clone issues with ip6

Problem: You're doing "git push" or "git clone" and it takes forever to connect.

This could be a lot of things. In my case it was a firewall issue on a dual stack server hosting my repository.

How can you tell?

git config -global core.sshCommand "ssh -vvv"

This enabled verbose mode for SSH. Now try to clone your repo and you'll get a lot more information.

In my case, it was a DNS resolution problem.

[email protected]:test $ git pull origin master
OpenSSH_7.4p1, LibreSSL 2.5.0
debug1: Reading configuration data /Users/dkilgo/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolving "test.me" port 49001
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to test.me [xxxx:xx:xxxx:x:xxx:xx:xx:xxx] port 49001.
debug1: connect to address xxxx:xx:xxxx:x:xxxx:xx:xx:xxx port 49001: Operation timed out
debug1: Connecting to test.me [000.00.00.000] port 49001.
debug1: Connection established.
….

I got a timeout on the ip6 address. The SSH port on this dual-stack server is being blocked. Once it fails, git will try ip4 which works.

Since I don't have control over the network here, I can work around this issue with ssh's config.

How do I fix this without breaking everything else that uses ip6?

You could just disable ip6 in your network settings. In 2017, that's not the most practical solution. We can do that for just one host in our SSH settings and get the same effect.

Edit your ~/.ssh/conf and add

Host test.me
AddressFamily inet

This tells ssh to only use ip4 for this host. This makes my one buggy host happy and doesn't mess with the rest of the internet. If you discover ip4 is the problem for you and ip6 works, set that to "inet6" instead. 

Don't forget to turn off that verbose logging we turned on earlier.

git config -global core.sshCommand "ssh"

 

If this didn't fix your issue, try git's debug options.

GIT_CURL_VERBOSE=1 GIT_TRACE=1 git pull origin master

The GIT_TRACE environment var makes git output more debug info during any operation. Setting it like this means it will only impact this command.

If you want this to work for any user or app, you can export that var.

EXPORT GIT_TRACE=1

and any call to git will output debug info, even from a tool like source tree or git embeded in an IDE. More info on git environment variables.