Reposted as I didn’t have it categorized as loops & logic…
OK so…next trick. In CCS I create a shortcode, define some variable names, then run a gravity forms shortcode from within the CCS shortcode. In the gravity form I use the parameters like [get planname] to populate a field in gravityforms. Works like a charm, and lets you pass data into the gravity form. I’m able to recreate the logic in L&L but when I invoke it doesn’t pass any of the data… Here’s what it currently looks like…
Woo, that’s quite a trick with CCS and Gravity Forms.
The reason it’s not working is that dynamic tags in L&L can only be used inside templates, unlike shortcodes which are supported in a lot of places. This limitation is by design, to ensure that only admin users have the power to use L&L tags.
One way I can imagine to pass L&L variables to Gravity Forms, is to create a template, for example:
<Get name=planname />|<Get name=homeplanid />
And get that template with a shortcode, like [template id=123].
OK I like where you are going with that - going to try just calling the above template and its logic from within a GF HTML field and see what happens. Will update once tested.
This is useful, but somewhat limited. For example, you can’t embed merge tags in HTML fields in a Gravity Form. Also, you in theory could generate a custom list from L&L and populate a gravity drop down on the fly with it. I haven’t gone through all my use cases yet, I’ve started with the easier ones…
It would be useful if you could still encapsulate a shortcode and then use L&L within it. The scenarios are nearly limitless. Encapsulate a slider and populate the overlays with post data. Populate a google map. Etc…
Very limited. For example, I used CCS to populate data into the question labels -
Is [get sitename] Your Listing? But I can’t do that with merge tags or with dynamically populated fields…
Would love a way to do this again…
Also, I’m getting an error message when I move to the second page of a multi-page form that I’m attempting to diagnose. EDIT: error message may be a license issue with staging environment.