Documentation

gwp_get_matched_entries_values

The gwp_get_matched_entries_values Modifier gets multiple values from active entries where the match_id property value of an entry equals the Merge Tag value ($value). Returns the values in html format.

:get_matched_entries_values form_id= match_id= wrap_tag= wrap_class= row_tag= col_tag=  col_class= col_class_postfix= options= filter1= return_id2=

Example

You want to quickly show a HTML table with values from another Gravity Form.

Form A: for organisation form_id=1

FIELD IDFIELD LABELENTRY EXAMPLE
1Organisation IDORG001
2Organisation NameTest Company

Form B: with client data form_id=2

FIELD IDFIELD LABELENTRY EXAMPLE
1Client IDC101
2Client NameJohn Doe
3Client E-mailjohndoe@test.com
4Client Organisation ID ORG001
FIELD IDFIELD LABELENTRY EXAMPLE
1Client IDC102
2Client NameGary Healy
3Client E-mailghealy@test.com
4 Client Organisation ID ORG001
FIELD IDFIELD LABELENTRY EXAMPLE
1Client IDC103
2Client NameGary Healy
3Client E-mailghealy@test.com
4 Client Organisation ID ORG001

Example shortcode

{Organisation ID:1:get_matched_entries_values form_id=2 match_id=4 wrap_tag=table wrap_class='clients-table' row_tag=tr col_tag=td value=caption_lastword col_class=client_col_ col_class_postfix=value options=created_by:col_average filter1=usr return_id1=2 return_id2=3}
  • The Merge Tag we us is {Organisation ID:1} in the context of Form 1 (Organisations). We want to retrieve data from Form 2 (Clients) to show a HTML table with a short overview of clients that belong to this organisation, showing the name of the client and the e-mailadress. So form_id points to the form we want to search through (in this example form_id=2).
  • We only want to show clients where the Organisation ID’s match, so match_id=4 (the field in the clients form where the Organisation ID is stored).
  • We want to wrap our results in a table and give the table the class ‘client-table’. You do that by defining the wrap_tag=table and wrap_class=’client-table’.
  • The row_tag=tr makes sure every client is being output in a seperate row (tr-tag).
  • Every value that we want to output gets a seperate column in the table, so col_tag=td.
  • In our HTML table, we want to show the Client name (Field ID 2 in Form ID 2), so we set return_id1=2. And in the second column on every row in the HTML table we want to show the e-mail address (Field ID 3 in Form ID 2), so add to the modifier return_id2=3. We can also add other columns by adding return_id3, return_id4 etc.

Last updated: 10-01-2022

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