When working with BricksForge forms, you may notice that some fields appear to support dynamic data (they show the dynamic data icon), but in reality, they don’t properly process dynamic values. This can be particularly frustrating when trying to use dynamic values in places like redirect URLs.
The Solution: Live Field References
There’s a reliable workaround using BricksForge’s live field reference system. Any form in BricksForge allows you to reference other field values using the {{field_name}}
syntax, and these references work almost everywhere within the form settings.
Step-by-Step Guide
- Create a hidden field in your form
- Add a new Hidden Field element to your form
- Give it a descriptive ID (e.g., “my_cct_id”)
- Populate the hidden field with dynamic data
- Select your hidden field
- Use the dynamic data selector to populate its value
- This could be a CCT ID, post ID, or any other dynamic value
- Reference the hidden field wherever needed
- In places where direct dynamic data isn’t working (like redirect URLs)
- Use the syntax:
{{field_id}}
(e.g.,{{my_cct_id}}
)
Real-World Example
I encountered this issue when building a form that submits and updates data to a JetEngine CCT via the REST API. The redirect URL field showed dynamic data support, but mysteriously ignored the CCT ID I was trying to use.
Here’s how I fixed it:
- Added a hidden field with ID “my_cct_id” to my form
- Set its value using dynamic data to pull in the CCT ID
- In the Pro Form redirect URL settings, used:
yourdomain.com/url/?cct={{my_cct_id}}
The form now correctly redirects to the specific item after submission, with the proper CCT ID in the URL.
Why This Works
The live field reference system ({{field_name}}
) is a core part of the form processing system and takes precedence over direct dynamic data injection in many contexts. By using this method, you’re leveraging a more reliable system for passing dynamic values through your forms.
Hope this helps save someone else the hours of troubleshooting it took me to figure out!