Automatically pass logged-in WordPress user data as URL parameters to embedded FormAssembly forms.
WPUser-to-FormAssembly-prefill is a lightweight WordPress plugin that bridges the gap between your WordPress user accounts and FormAssembly forms. When users are logged into your WordPress site, this plugin automatically appends their information as URL parameters to any embedded FormAssembly forms, enabling seamless data prefilling and Salesforce lookups.
- 🔐 Automatic User Detection - Only adds parameters when users are logged in
- ⚙️ Flexible Configuration - Map any WordPress user field to any URL parameter
- 🎯 Zero Code Required - Simple settings interface for configuration
- 🔄 Works with Multiple Embed Methods - Supports both FormAssembly plugin shortcodes and manual iframe embeds
- 📊 Salesforce Integration Ready - Perfect for passing user IDs for Salesforce lookups
- WordPress 5.0 or higher
- PHP 7.0 or higher
- One of the following:
- FormAssembly WordPress Plugin installed (if using shortcodes)
- OR manually embedded FormAssembly iframes in your content
- Download the latest release ZIP file from the Releases page
- Go to Plugins → Add New in your WordPress admin
- Click Upload Plugin at the top
- Choose the ZIP file and click Install Now
- Click Activate Plugin
- Download and extract the plugin files
- Upload the
WPUser-to-FormAssembly-prefillfolder to/wp-content/plugins/ - Activate the plugin through the Plugins menu in WordPress
- Go to Settings → FA User Prefill in your WordPress admin
- Add parameter mappings, one per line, in this format:
parameter_name=user_field
ID- WordPress user IDuser_email- User's email addressuser_login- Usernamedisplay_name- Display namefirst_name- First namelast_name- Last name- Any custom user meta field key
Pass user ID for Salesforce lookup:
sfid=ID
Pass email address:
email=user_email
Pass multiple fields:
email=user_email
userid=ID
firstname=first_name
lastname=last_name
If you have the FormAssembly WordPress plugin installed, simply use their shortcode as normal:
[formassembly formid=123456 iframe=1]
The plugin will automatically detect the generated iframe and append your configured parameters.
If you're manually embedding FormAssembly forms with iframes:
<iframe src="https://yourInstance.tfaforms.net/123456" width="100%" height="600"></iframe>The plugin will automatically append parameters to any iframe containing tfaforms or formassembly in the URL.
When a logged-in user views a page with a FormAssembly form:
Before:
<iframe src="https://example.tfaforms.net/123"></iframe>After (automatically modified):
<iframe src="https://example.tfaforms.net/123?email=user@example.com&sfid=42"></iframe>Non-logged-in users see the form without parameters, ensuring your forms still work for anonymous visitors.
- Salesforce Contact Lookup - Pass WordPress user ID to lookup Salesforce contacts
- Pre-filled Forms - Improve user experience by pre-filling name, email, etc.
- User Tracking - Track form submissions by WordPress user ID
- Membership Sites - Integrate member data with FormAssembly forms
- Customer Portals - Pre-populate customer information in support forms
No, but it's recommended. This plugin works with:
- FormAssembly plugin shortcodes that generate iframes
- Manually embedded FormAssembly iframes
The form displays normally without any parameters appended. This ensures your forms work for all visitors.
Yes! Use any custom user meta field key as the value. For example, if you have a custom field called salesforce_id, you can use:
sfid=salesforce_id
This plugin is specifically designed for FormAssembly forms. It looks for iframes containing tfaforms or formassembly in the URL.
No. The plugin only processes content that contains FormAssembly iframes, and the processing is minimal.
- Issues: Report bugs or request features on GitHub Issues
- Documentation: Check the Wiki for detailed guides
Contributions are welcome! Please feel free to submit a Pull Request.
This plugin is licensed under the GPL-2.0+ License. See the LICENSE file for details.
Developed by Tom G
- Initial release
- Support for WordPress user field mapping
- Support for FormAssembly plugin shortcodes
- Support for manual iframe embeds
- Settings page for easy configuration