Checkboxes on pardot custom form handler aren’t saving. Are you using php? 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 when using pardot with a php client.

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.

To be clear, [] for arrays is a php thing.

Hopefully this solved your problem.

Asking for a friend; What plug-ins should I install on a new WordPress installation?

This is my current “base” set of plug-ins

https://wordpress.org/plugins/wordfence/
A firewall for wordpress. Also adds 2factor auth and attack monitoring.
This is quite literally the first thing I install on a new wordpress installation.

https://wordpress.org/plugins/wordpress-seo/
Manage post meta info that search engines see. Yoast hasn’t broken during an update yet and I manage 30+ wordpress sites.

https://wordpress.org/plugins/wp-super-cache/
A fast cache plug-in from the folks that make wordpress. (Automattic)
I’ve tried a few others and I’ve experience issues during major version upgrades. This one hasn’t failed me yet.

https://wordpress.org/plugins/disable-json-api/
If your not using the REST api, lower your attack surface by disabling it.

https://wordpress.org/plugins/updraftplus/
Best backup plug-in, hands down. Does have ads for it’s premium version.

Honorable mentions

https://wordpress.org/plugins/jetpack/
This is an all-in-one package that solves a lot of problems with wordpress.
IMHO, the best feature is their analytics, which doesn’t require creating or sharing data with google.
It isn’t a lite deal. You’ll find plenty of folks who rip on it.
https://www.collectiveray.com/wordpress-jetpack-review-plugin

https://wordpress.org/plugins/genesis-blocks/
Adds many useful “blocks” which aren’t included by wordpress normally.
Note that it requires PHP > 7.2

https://wordpress.org/plugins/wp-mail-logging/
Is very useful for debugging issues sending mail with wordpress.
Keeps a log of every message sent.

One more thing

A little advice for choosing a theme or plug-in;
Look at the changelog and support forum on wordpress.org
If no recent updates or developer feed back have been provided; don’t use it. It’s a dead plug-in and will likely be a future update or security issue on your site.

auto-cpufreq

I’m a new convert to using Ubuntu as my full-time development environment. Each change in platform requires some adjustment of development tools and such. Being a user of vagrant means there wasn’t much to change in development setup. PHPStorm is multi-platform, as are the MySQL Workbench tools. Hiri is getting me connect to our exchange email/calendar system and gitKracken has replaced sourcetree. (Come on guys. I really miss sourcetree. ) There’s even a linux version of zoom, though not as feature complete as the windows or mac client.

One possible deal breaker I’ve been fighting with is battery life on this linux laptop. I could get around 6 hours from the 3 year old windows laptop. My new linux laptop gets 2 or 3 tops. Thankfully, Mr. Hodzic has solved that problem for me with his wonderful tool “auto-cpufreq“. It installs as a “snap”. (a sandbox for apps). There is a very useful screen cast right there on the snap home page which explains the what, why and how for this tool. It’s un-complicated, accessible and automatic.
I’m now getting closer to 5 or 6 hours between charges.

Install

sudo snap install auto-cpufreq
sudo auto-cpufreq --install

and your done.
You really should watch the screencast. It’s worth the minutes.
and if you can, please toss Adnan some coin.

Updating search indexes (attempt: 1) – Error (time: 0.027s): fopen(assets/uploads/something.pdf): failed to open stream: No such file or directory

I’ve spent a whole day trying to debug a queue error with craft cms 3. I’m using the “document-search” plug-in to make assets searchable and while testing it discovered some errors in my queue.

Manually running these jobs one by one would complete successfully but any time the queue tried to run them; they would fail.

Finally after digging through the assets api I discovered this was a configuration error.

Notice the “File System Path”. That use of a relative path turned out to be the issue. When the queue running starts a job, it doesn’t start in the webroot (Usually the “craft/web” folder). That’s why it works just fine from the web ui and fails for the queue runner.

So what should this value have been?

“@webroot/assets/uploads/docs” instead of “./assets/uploads/docs” did the trick. This alias works for both the web ui and queue. The only silver lining for me was a reason to dive into the minutia of crafts assets.

Doing an “Annual contract, paid monthly” with Adobe Creative Suite? Read the fine print.

I needed photoshop for a short period of time and saw the option of month to month and thought this was great. Access to photoshop when I need it for $10 a month. That’s reasonable.

Should have read the fine print.

Cancellation Terms

You can cancel your subscription anytime via your Adobe Account page or by contacting Customer Support*. If you cancel within 14 days of your initial order, you’ll be fully refunded. Should you cancel after 14 days, you’ll be charged a lump sum amount of 50% of your remaining contract obligation and your service will continue until the end of that month’s billing period.

It wasn’t obvious anywhere in the check out process that this was an annual contract with a cancellation penalty. Only when I finally got around to canceling did I notice which was too late.