Greetings,
It is possible to store a Merge Tag value in a variable? So far not successful at it. Please advise.
Thanks.
Greetings,
It is possible to store a Merge Tag value in a variable? So far not successful at it. Please advise.
Thanks.
Hi Preston. Which merge tag, and at what time are you trying to store that value? Are you using one of the Gravity Forms hooks or filters?
Greetings Chris,
Thanks for replying.
The Scenario
I have a situation wherein the client will have two types of registered users in his site.
I am using Gravity Perks’ Better User Registration Perk (GPBUA).
after_password_reset
hook).Ergo, I need to display a different Activation Success page for Admin Registrants.
gpbua_activation_page_id
and provides an example, but that example does not show any integration with the current registrants info.The Merge Tags
I noticed that GPBUA has a number of merge tags, and TWO of the merge tags work with information that directly relates to the current registrant (i.e. gpbua:username
and gpbua:email
).
David Smith from Gravity Perks recommended the following:
If you want to capture the value of a merge tag in a PHP variable, you could do something like:
$my_value = GFCommon::replace_variables( '{any_merge_tag}', $form, $entry );
. You’d need the form and entry arrays to make it work. And just replace {any_merge_tag} with any merge tag.
…and therein lies the problem: I don’t HAVE that information.
But again, the merge tags provide enough personally identifiable info on the current registrant for me to find that info.
Hence my question: “Is it Possible to Store a Merge Tag Value in a Variable (PHP)?”
Thanks
Hi Preston. I don’t have an answer for you, but I have a question. I’m not that familiar with the Gravity Wiz perk you’re using, but I installed it, and can you tell me on which page in this screenshot do you need to know that the user is an Administrator (so you can show them the information about 2FA)?
I was able to get the user information when going to the “Redirect Page” but I am wondering if you need it there, or if you need it when going to the “User Activation Page”. Please let me know.
The top one. “Activation”.
Hi Preston. I checked in with David and he’s going to investigate and update this topic when he has some idea. Thank you.
Yep. I heard back from him as well. Will keep you posted.
Behold! Stand still and see the mighty “goatness” and wizardry of @david Smith of GravityWiz. His Fix for Conditional Activation Pages for GPBUA is a thing of beauty!
Watch the video, then check out the code.
Mad props again to @david!
Preston
David is the
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.