Yates Connect

Connect Dashboard

At-a-glance activity from the Connect form: totals, trends, and (for staff) a table view.

This dashboard reads your website’s Connect submissions, tallies totals and topics, and shows a monthly trend. It updates automatically as new entries arrive. Need the raw data? Staff can open the admin list and use the CSV export.

5
Total entries (12 mo)
9
Topic selections
0
Assistance flagged
0
Prayer requests

Trends

Data & downloads

  • Entries list (admin): Connect β†’ Entries
  • CSV export: use the toolbar/export action in the same admin screen.
  • Charts: use the buttons above to copy a PNG of each chart for reports.
Yates Connect Β· Technical Readout

πŸ›Ÿ Yates Connect Forms β€” Technical Overview

This chapter documents how the Yates Connect system works end-to-end: form UI, security, handlers, Constant Contact integration, storage, reporting/dashboards, and how to extend or troubleshoot it. It’s plain PHP + WordPress with Code Snippetsβ€”no vendor lock-in.

High-level architecture

[Visitor Browser]
  β”‚  (two-step form UI, v3 reCAPTCHA token)
  β–Ό
/admin-post.php?action=yc_connect_submit
  β”‚  (nonce + v3 verify + validation + routing)
  β”œβ”€β–Ί HTML staff email (branded)
  β”œβ”€β–Ί HTML auto-reply to submitter
  β”œβ”€β–Ί Constant Contact: add/update contact on list
  └─► Store entry (CPT) β†’ used by Dashboard + CSV

Primary touchpoints

  • Shortcode [yc_connect] renders the two-step form with conditional UI and reCAPTCHA v3.
  • Submit handler yc_connect_submit validates & processes, then redirects to /connected.
  • Constant Contact OAuth persists a site-wide access token used to add new opt-ins.
  • Storage (CPT) records each submission for reporting and exports.
  • Dashboard [yc_connect_dashboard] renders cards/charts/table (role-aware).
  • Mail uses WordPress wp_mail() (through your WP Mail SMTP configuration).

Key integrations & secrets

reCAPTCHA v3 (Invisible)

// In wp-config.php (keys redacted)
define('YC_RECAPTCHA_SITE_KEY',   'YOUR_SITE_KEY');
define('YC_RECAPTCHA_SECRET_KEY', 'YOUR_SECRET_KEY');

define('YC_AUTOREPLY_FROM',    'Yates Baptist Church <info@yateschurch.org>');
define('YC_AUTOREPLY_REPLYTO', 'info@yateschurch.org');
define('YC_NEXT_STEPS_URL',    '/connected');

Back-compat aliases (optional):

if (!defined('YC_RC_SITE_KEY'))   define('YC_RC_SITE_KEY',   YC_RECAPTCHA_SITE_KEY);
if (!defined('YC_RC_SECRET_KEY')) define('YC_RC_SECRET_KEY', YC_RECAPTCHA_SECRET_KEY);

Constant Contact β€” Default list Yates E-News, ID fe719220-36bb-11ee-a8f4-fa163e6a92d8; OAuth app β€œYates Baptist Church Web Connect”, redirect ...admin-post.php?action=yc_cc_oauth_cb.

User-facing form (shortcode + UI)

Shortcode: [yc_connect]

Two steps, conditional follow-ups (Children/Youth/Music/Groups), prayer field (~300 words), E-News opt-in, privacy modal, reCAPTCHA v3 token injection.

Server handler (submit pipeline)

CSRF β†’ reCAPTCHA β†’ validate β†’ de-dupe β†’ staff HTML email β†’ branded auto-reply β†’ Constant Contact (if opted) β†’ store CPT β†’ redirect to /connected?thanks=1.

Storage, Admin, Exports, Dashboard

yc_connect_entry CPT (capability: manage_connect_entries). CSV export from admin. Dashboard shortcode examples:

[yc_connect_dashboard] β€” safe summary

[yc_connect_dashboard show="cards,chart,table" months="12" limit="50"] β€” internal

Snippet inventory

OAuth callback, CC tools page, creds/test/list, reCAPTCHA bootstrap/loader/verifier, form shortcode, handler, storage+CSV, dashboard.

How to extend

Add topics/UI β†’ map to handler meta/email β†’ include in storage/dashboard if reporting needed.

Setup checklist

Keys β†’ activate snippets (order) β†’ CC Connect OAuth + set default list β†’ create /connect and /connected β†’ verify mail.

Troubleshooting

OAuth creds placement, cURL 28, CC email validation, reCAPTCHA keys/action/score, SMTP deliverability, mobile overflow, emergency pause (disable handler).

Data access

Admin list, CSV export, dashboard; respect PII & role-gating.

Field inventory

Contact (name/email/phone), topics + sub-selections, assist/prayer, message, subscribe.

Security & privacy

Secrets in wp-config.php; reCAPTCHA enforced; capability-gated viewing; retention policy recommended.

Reusable pattern

New UI β†’ same handler β†’ optional reporting changes.

Yates Baptist Church uses Accessibility Checker to monitor our website's accessibility. Read our Accessibility Policy.

Video

Scroll to Top