Documentation

gwp_get_matched_entry_value

The gwp_get_matched_entry_value Modifier can be used to retrieve values from entries from another form, based on a shared value.

:gwp_get_matched_entry_value form_id= match_id= return_id=

The minimum requirements when using this Modifier are at least:

  • form_id: ID of the Form you want to search through.
  • match_id: ID of the Field within that Form that matches your current Merge Tag ID.
  • return_id: ID of the Field that you want to get the value from.

Examples

A real life example. You have a Gravity Form with data about schools (in the Netherlands, schools have an unique ID, which looks like this: 99ZZ). Every school has such a unique identifier. Imagine that you have another Form on your site for Dutch teachers. They can easily fill in their unique school ID.

Based on this unique code, you want to find a match with the school and retrieve more data about the school, for example the address, telephone number or a postal code.

Let’s see how we can quickly do that with using the gwp_get_matched_entry_value Merge Tag:

Form A: for teacher form_id=1

Field IDField LabelEntry example
1School BRIN number99ZZ
2Name TeacherJohn Doe

Form B: with School data form_id=2

Field IDField LabelEntry example
1School namePrimary School the Balloon
2AddressStreetname 3, 2801SX, Gouda
3Telephone+310700000001
4School BRIN number99ZZ

Use Merge Tag Modifier in Form A

After the teacher submits her Form, you send an e-mail. In the e-mail you want to show the school name that matches with the unique BRIN id. When we use the Merge Tag without modifiers, it will return the BRIN number:

{School BRIN ID:1}9977

Now we want to find the school name. We can do that by adding our Modifier like this:

{School BRIN ID:1:gwp_get_matched_entry_value form_id=2 match_id=4 return_id=1} Primary School the Balloon

{Textfield:1:gwp_get_matched_entry_value form_id="2" match_id='1' return_id=2 sort_order=asc}

with offset=1: returns the second oldest entry value.

{Textfield:1:gwp_get_matched_entry_value form_id="2" match_id='1' return_id=2 sort_order=asc offset=1}

Last updated: 30-10-2021

Advanced Merge Tags1.0.5

To use the functionalities described in this documentation, you'll need to get the GravityWP - Advanced Merge Tags add-on.

Read more

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close