« Back to Add-on Library

Field Data

Field Data
Field Data Display is a powerful yet simple snippet that retrieves FileMaker data and displays it on your WordPress site. Whether you need to show a single field value or create complex formatted layouts with portal data, this snippet handles it all with built-in caching for optimal performance.

### Key Features

-
Simple Field Display - Output any FileMaker field with a shortcode
-
Custom Formatting - Create formatted layouts for complex data
-
Portal Data Support - Access related records from FileMaker portals
-
Intelligent Caching - Reduces FileMaker queries for better performance
-
Cache Management - Clear cache from FileMaker when data changes
-
Preview Documentation - Built-in testing and documentation in preview mode
-
Production Ready - Includes working company contact card example

### Display Options

-
Direct Field Output - Simple field values with automatic escaping
-
Custom Cases - Create formatted HTML/CSS layouts for specific fields
-
Portal Integration - Display related records from multiple portals
-
Conditional Display - Check field existence before rendering
-
Responsive Design - Professional styling included with snippet

### Requirements

✓ CWP Snippets plugin installed (Free or Pro)
✓ WordPress 5.8 or higher
✓ PHP 7.4 or higher
✓ FileMaker Server with Data API enabled
✓ FileMaker connection constants configured in CWP Snippets

### Caching System Features

- Configurable cache duration (default: 7 days)
- Disable caching during development (set to 0)
- Clear specific cache keys via REST API
- Clear all cache with single API call
- FileMaker script integration for automatic cache clearing
- WordPress transient-based caching

### Ideal For

- Company information pages
- Contact details display
- Staff/team member profiles
- Product information
- Custom data displays
- Portal relationship data
- Dynamic content from FileMaker
- High-traffic data that changes infrequently

### What's Included

✓ Complete PHP snippet with caching
✓ Professional CSS styling
✓ Working company contact card example
✓ Portal data integration example
✓ Preview mode documentation
✓ FileMaker script examples
✓ Cache management instructions
✓ Customization guide

### Working Example Included

Company Contact Card:
Demonstrates best practices for custom formatting including:
- Photo display
- Name composition (First + Last)
- Job title and company
- Address from portal data
- Phone from portal data
- Email from portal data
- Website link with proper escaping

### Customization Points

1.
Database Constants (line 71) - Remove '_DEMO' suffix for production
2.
Configuration Variables (lines 23-43) - Layout, record ID, cache settings
3.
Custom Cases (lines 130+) - Add your own formatted displays

### Cache Control from FileMaker

Automatically clear cache when data changes using FileMaker's
Insert from URL script step. The snippet includes complete FileMaker script examples for both specific cache key clearing and clearing all cached data.

---

Flexible FileMaker data display with intelligent caching and custom formatting capabilities for WordPress.

Downloads