Gravity Forms All Fields Template
Take complete control of the Gravity Forms {all_fields}
merge tag output with this lightweight plugin.
August 31, 2023: Added support for using specific inputs in the :filter
modifier.
May 2, 2023: Added support for parsing modifiers that include underscores (e.g. :my_custom_modifier
).
February 9, 2022: Fixed issue where Signature field images would not show if using the :filter
modifier and GF Signature 4.0 or newer.
January 19, 2022: Added support for excluding Consent field descriptions using the :exclude
modifier.
November 3, 2021: Added support for excluding specific child fields from a Nested Form field via the :exclude
modifier.
October 1, 2021: Added the gwaft_template_paths
filter to allow filtering the available template paths including adding a custom path.
June 16, 2021: Fixed an issue where nopricingfields
may still show "Order Summary" label when other modifiers are used.
June 14, 2021: Fixed an issue where "Order Summary" label would still appear when using nopricingfields
modifier.
April 16, 2021: Added support for filtering via custom function.
November 9, 2020: Added support for excluding specific inputs of multi-input fields via the :exclude
modifier.
November 3, 2020: Migrated snippet to the Snippet Library.
January 27, 2020: Added :nopricingfields
modifier to hide pricing fields from {all_fields}
output.
September 5, 2019: Fixed notices generated in PHP7.3 by continue
statements inside a foreach/switch.
April 11, 2019: Updated priority of template replacement to avoid conflict with other merge tags replacement plugins.
The Gravity Forms {all_fields}
merge tag provides a super simple way to output all of the submitted form data but it’s notoriously difficult to customize.
This simple Gravity Forms plugin provides templating support for the {all_fields}
merge tag. Huh? It means you can replace the markup generated by the merge tag with the contents of a file. This tutorial offers a solid starter template file too!
- Getting Started
- Customizing the Template
- Doing more with Gravity Forms
- Known Limitations
- FAQs
- Questions? Feedback?
Getting Started
This tutorial assumes you’re running a recent version of Gravity Forms, that you already have the {all_fields}
merge tag implemented wherever you want, and that you ♥ Gravity Wiz.
Download, install, and activate the plugin. | |
Download the sample template directory/file. Add the folder to your active theme’s root directory: /wp-content/themes/{your-theme}/
|
|
Customize the template as desired. |
Template and Merge Tag Options
This plugin provides a few handy modifiers for controlling which template will be used to render the {all_fields}
merge tag.
Note: All template paths are relative to your theme’s root directory.
You can combine merge tag modifiers by separating them with a comma. For example: {all_fields:nohidden,exclude[3,4]}
Default Templates
Merge Tag | Template |
---|---|
{all_fields} | /gravity-forms/all-fields.php |
Form-specific Template
Providing a form-specific template requires no changes to the merge tag. Simply append the targeted form ID to your template’s name. This template will now only be used when the merge tag is used in the context of the specified form.
Merge Tag | Template |
---|---|
{all_fields} | /gravity-forms/all-fields.php /gravity-forms/all-fields-1.php |
Custom Template
You may want to create a custom template that should only be applied to specific instances of the merge tag. The “template” modifier allows you to specify a custom template suffix.
Merge Tag | Template |
---|---|
{all_fields:template[custom]} | /gravity-forms/all-fields-{template}.php /gravity-forms/all-fields-custom.php |
No Template
You may want to create a generic template that applies to all instances of the merge tag by default and then disable that template to use the default Gravity Forms merge tag output in a few specific instances.
Merge Tag | Template |
---|---|
{all_fields:notemplate} | No template |
Hide Pricing Fields / Order Summary
By default, Gravity Forms does not output any individual pricing fields but it does append an order summary which includes a summary of all submitted pricing fields. The :nopricingfields
modifier removes the order summary.
Merge Tag | Description |
---|---|
{all_fields:nopricingfields} | Hide order summary |
Field Filtering Modifier
These modifiers allow you to control which fields are output in the {all_fields}
merge tag without having to touch any code.
Please note: you only need the plugin installed to use these modifiers. You do not need to install the template files in your theme.
Merge Tag | Description |
---|---|
{all_fields:include[1,2]} | Include a field that is not included by default (i.e. HTML fields). |
{all_fields:exclude[3,4]} | Exclude a field that is included by default. |
{all_fields:filter[1,2]} | Only include the specified field IDs. This takes precedence over both the ‘include’ and ‘exclude’ modifiers. |
{all_fields:include[1,2],exclude[3]} | The :include and :exclude modifiers can be combined. |
GF Nested Forms Support
To filter which fields from a child form display in your {all_fields}
merge tag you can use the :filter modifier and the [Nested Form Field ID].[Child Field ID] format (e.g., 4.3; where 4 is the Nested Form field ID and 3 is the child field ID from the child form).
You can use the :include, :exclude, :filter, and :index modifiers on the Nested Form field to filter which child fields should be displayed.
Merge Tag | Description |
---|---|
{all_fields:filter[1,2,3.4,3.5]} | In this example, 1 and 2 are field IDs on the parent form. 3 is the Nested Form Field ID and 4 and 5 are field IDs on the child form. |
{all_fields:exclude[3.4,3.5]} | In this example, 3 is the Nested Form field ID and 4 and 5 are field IDs on the child form. |
{Nested Form:1:filter[4,5]} | Show fields 4 and 5 from the child form for this Nested Form field. |
{Nested Form:1:index[0],filter[1]} | Show field 1 in the first child entry from the child form. :index must be paired with :filter. |
Use {Nested Form:1:index[-1],filter[1]}
to target the last entry and display the value from field 1.
Excluding Specific Inputs Within a Field
Fields that contain multiple inputs, such as the Name field, can be excluded per-input by specifying the input ID. For example, to exclude the First Name, add .3
to the Field ID (e.g., 5.3; where 5 is the Name field).
This works for any field that contains multiple inputs, such as Name, Address, and Product. You can find the specific input IDs in Gravity Forms Documentation for Name and Address fields.
Merge Tag | Description |
---|---|
{all_fields:exclude[5.3]} | In this example, 5 is the field ID of a Name field. 3 is the First Name input ID. |
Excluding specific inputs allows you to hide some personal information (like first names and street addresses) while still taking advantage of the convenience of the {all_fields} merge tag.
Filter and Exclude Via Custom Function
Custom functions can be used to identify fields for filtering. Using a custom modifier, the function should return an array of field IDs. For example, if you want to exclude fields with personal information from some instances of the {all_fields}
merge tag, you could specify a custom modifier value like so:
{all_fields:exclude[persInfoFields]}
And then create a custom function to identify the IDs of those fields.
add_filter( 'gwaft_modifier_value_persInfoFields', function() {
return array( 1, 2, 3 );
} );
Merge Tag | Description |
---|---|
{all_fields:exclude[customFunction]} | Exclude fields that are returned via customFunction. |
{all_fields:filter[customFunction]} | Show fields that are returned via customFunction. |
This is useful in circumstances when you need to use the {all_fields}
merge tag in multiple places and want to exclude the same fields in several contexts. Instead of having to copy the same string of field IDs to every place you’ve inserted the {all_fields}
merge tag, you can specify the custom function once and use the custom filter wherever you need it. If you want change or add to the excluded fields in the future, you simply update the custom filter and it will be applied everywhere the filter is used.
Customizing the Template
Ok, don’t let this section intimidate you. Here’s the TLDR; Loop through $items
, use $item['label']
for the field label, and $item['value']
for the field value. Here’s the simplest template you could have:
<ul>
<?php foreach( $items as $item ): ?>
<li>
<strong><?php echo $item['label']; ?><strong><br>
<?php echo $item['value']; ?>
</li>
<?php endforeach; ?>
</ul>
You’ll most likely want to use the sample template above as a starting point though as it takes care of a requirements to better align the template with Gravity Forms default All Fields functionality.
Digging Deeper
The {all_fields}
template works like any other WordPress template with one exception. There is a special $items
array available to you.
Each $item
contains a label, value, and field property. The label and value are the exact label and value that the default {all_fields}
merge tag would output. The field is the input-type-specific GF_Field object for the current field. This is useful when you want to alter the way a field is displayed depending on the field you’re working with.
Lastly, you have access to the current entry via the $entry
variable and the current form via the $form
variable. For more details on these variables, see the parameters section below.
Parameters
$items array
An array of items, each item containing the Gravity-Forms-formatted field label, field value and field object for the given field. The field label and field value are the same values that Gravity Forms outputs in the default
{all_fields}
merge tag.$entry Entry Object
The current Gravity Forms Entry object.
$form Form Object
The current Gravity Forms Form object.
Doing more with Gravity Forms
Okay, so with this plugin you can easily handle {all_fields}
data. But what if you just don’t feel you’ve got enough different fields in your Gravity Forms? What if you want to export more fields? That’s where Gravity Perks comes in. Gravity Perks is an essential bundle of 34+ WordPress plugins that add new features for Gravity Forms. Plugins such as…
GP eCommerce Fields
With the GF eCommerce Fields plugin you can easily add eCommerce field types to your Gravity Forms. The new pricing fields include Discount, Tax, and Subtotal. This plugin also improves upon the functionality of Gravity Forms’ Coupons and Shipping fields.
GF eCommerce also adds support for special merge tags for including the subtotal, coupon and conditional-logic-based discount amounts in calculation-enabled fields along with a handy merge tag for displaying the order summary in your confirmations and notifications.
It’s great for helping your users better understand their orders by showing the subtotal before shipping, coupons and taxes have been applied – avoiding any nasty surprises at checkout!
GP Easy Passthrough
Easy Passthrough simplifies transferring entry data from one Gravity Forms form to another. Instead of spending time setting up dynamic parameter names and customizing confirmation query strings, you can passthrough data by setting up an Easy Passthrough configuration.
Entry data is transferred across multiple sessions using the special Easy Passthrough token. This token is a secret key, unique to each entry, preventing random users from guessing at the token and passing through entries they should not have access to.
GP Post Content Merge Tags
This plugin allows you to include Gravity Forms merge tags in WordPress post content, allowing you to, for example
- Implement persistent confirmation pages. For example, you could send the user an email including the confirmation page URL to their form submission, which they could save for future reference.
- Reuse the same confirmation page for multiple forms. For instance, you might have 25 forms on your site but would like to redirect users from all of those forms to a single, personalized “Thank You” page on submission.
- Reclaim complete control over the styling of the redirect page while maintaining the ability to use Gravity Forms merge tags in the content of the page.
These are just 3 of the 34+ plugins in the Gravity Perks collection. Check out the full set of plugins and see what Gravity Perks can do for you today!
Known Limitations
The
:nopricingfields
modifier will apply to any{all_fields}
merge tag in the same setting.For example, if your confirmation contains both an
{all_fields}
and{all_fields:nopricingfields}
merge tag, the modifier will apply to the output of both merge tags.If your merge tags are in different settings, like an
{all_fields}
in the confirmation and{all_fields:nopricingfields}
in a notification, the confirmation would include the order summary and the notification would not.
FAQs
How do I hide Hidden fields from the {all_fields} merge tag?
You can use the :nohidden
merge tag modifier on the merge tag like this:
{all_fields:nohidden}
:nohidden
hides field output of fields using the Hidden field type. It doesn’t affect to fields set to a Visibility of Hidden.
How can I translate the Order Summary label?
You can set a custom Order Summary label using the gwaft_order_summary_label
filter.
add_filter( 'gwaft_order_summary_label', function() {
return 'My Custom Order Summary Label';
} );
Hooks
Questions? Feedback?
What questions do you have? What features are missing? We’d like to make this into a more robust plugin and your feedback will be a big part of shaping the final product.
Can I use this shortcode? {all_fields:exclude[3,4]} and snippet thru functions.php?
Hi Enzo,
The
{all_fields}
merge tag’s usage is on the frontend. It will not work when used directly in PHP.Hi I’m trying to get the description to show up in the email. I saw that you recommended someone use the [‘field’] [‘description’] so I did
This is the entirety of what I am using in the template … Here is a link to an image of the code https://theburkardschool.org/wp-content/uploads/2024/08/Code.png …
It’s not working for me. I only see the label and the value.
Any assistance is greatly appreciated Jake
Hi Jake,
Looking at your screenshot, the directory structure for your custom template isn’t quite right. The custom template should be called
all-fields.php
, and should be placed inside a directory calledgravity-forms
within your theme.So the path to your custom template should be
/your-theme/gravity-forms/all-fields.php
.If that doesn’t do the trick, we’ll need to dig into this some more. If you have an active Gravity Perks license, you can contact us via our support form so can look into this further.
Best,
How can I show the consent field description to email notifications?
Hey Raju,
You can use the {Consent Field Name (Description):fieldID.3} merge tag to show these in the email notifications.
Hello, I’m having a problem with the summary. On some forms it displays fine and on others it just displays {all_fields}. I don’t understand what’s causing the bug
Hi Ophélie,
We see that you also emailed us about this issue. We’re going to follow up with you there.
Hi there I am working on website which use the GF Nested Forms, now in parent notification i need to get only values of only one field of child form. I use {courses:47:filter[17]} works but also includes some html tags like
Thanks for your amazing plugins
Hi Saty,
The nested forms field contain multiple child entries, so when the filter modifier is used without the index modifier to target a specific index, it outputs the values in a bulleted format. Displaying the value separated with a comma may need some customization to get done. If you have an active Gravity Perks licence, you can contact us via our support form so we can assist you further.
In regard to the set modifier in {courses:47:set=17}, this is a calculation merge tag modifier and works in the calculations’ formula of a number field. So you’ll have to add a number field, enable calculation, and insert the set merge tag as a formula. You can then insert the merge tag of the number field wherever you want it to display the value.
Best,
Hi !
Thanks for this great tool !
Example : {all_fields:exclude[117,216,183,171,117.1,117.4,212.2,215.2,78,90,222]:nopricingfields}
Thank’s !
Hi Gael,
If you’re adding more than one modifier to the all fields merge tag, you separate the modifiers with commas. So what you have should be like so;
{all_fields:exclude[117,216,183,171,117.1,117.4,212.2,215.2,78,90,222],nopricingfields}
You do not have to include the Ids of product field in the exclude bracket, as that will be handled by the nopricingfields modifier.
Best,
So I’m using an HTML Block to dynamically add content to the form via jQuery. I’m then using this plugin to enable HTML Blocks to be in the email notifications. However the data in the email is the original information from the HTML Block field in the editor not the dynamically update content via my jQuery code. Is there a way on submission for the code on the page to be passed to the email not the original data from the field?
Hi Kyle,
We’ll need to look at the setup and jQuery code to know exactly what’s happening and know if there is a way to get it working for you. For this level of support, you’ll need to submit a ticket via our support form so we can assist you further.
Best,
I’m having an issue with submitting a specific child field through a redirect URL. Entering:
{Nested Form:3:index[0],filter[1]}
works correctly by pulling the correct info from the first field on the first entry and successfully includes that data in the redirect URL. However, changing the index to anything other than 0, e.g.:
{Nested Form:3:index[1],filter[1]}
does not capture any data. Changing the index to -1, which should capture the last entry, instead captures the first entry. Nothing I do will target and successfully capture anything other than the data from the first entry.
When using a text confirmation setting, all fields work as expected, it’s only when using a redirect URL.
Just following up here for others with the same issue. We worked with Danny via support and released a new version of Nested Forms that resolved this issue. ✅
How to hide two last table rows for “Total” and “Sub Total”, when a product field is on the form. I want to show product name and price in the order summary, but not the Total and Subtotal. I have separate fields for total calculation including Tax, so the default toal is not needed, and it actually shows the double amount because it sum up the calculated total field, and the default Total in the template.
Thanks
The All Fields Template can’t modify the order summary, but our eCommerce Fields Perk can. It adds support for custom order summary markup using this filter.
GP eCommerce Fields also adds support for Subtotal and Tax fields, which much supersede your need to omit the Total and Subtotal from the order summary, as they will properly integrate and calculate in the Order Summary.
Thanks Scott, That’s exactly what I want. I reviewed other Perks too and many of them are very helpful. Also found the product configurator, another great plugin from your team. What I noticed is GravityWiz needs annual subscription, but product configurator is a onetime license like Envato’s plugins. Is that right? Will you have any sales in the next two months? I’m thinking of the pro licenses with unlimited perk. Thanks
Hi Armin,
Glad to know the Perks are helpful. The Gravity Shop Product Configurator plugin is not a one-time license. The license is renewed annually. Yes, we’re planning a Black Friday sales next month.
Best
Great plugin!
Is it possible to remove the ‘map it’ link from address fields that are displayed througb {all_fields}?
Many thanks!
Hi Kirsty,
The “Map it” link is actually a feature of the Gravity Forms Address field. You can remove that using this Gravity Forms filter.
https://docs.gravityforms.com/gform_disable_address_map_link/
I know this might be a silly question, but is it possible to embed individual MERGE tags in a template, instead of doing a loop for all? I know it makes the output static, but that isn’t a big concern at the moment, for me.
Hi Brett,
Merge tags won’t work if inserted directly within the template because the template uses PHP. You could, however, customize the template with PHP to display specific field values, similar to what a merge tag will do. If you have an active Gravity Perks license, you can contact us via our support form so can look into this further
Best,
I was wondering if you could advise how to get the content in the description to show up on the email too. I have everything working apart from that? I was wondering if I can email you to show you what is happening, as easier to explain than type in this comment box.
Hi Jenny,
If you’re referring to the field description as shown in the following screenshot, you can use
$item['field']['description']
to retrieve that value.Hi Scott, I can’t seem to reply to your message.
I currently have this in place
{all_fields:include[21,23,25,29,26,27,28,5,6,9,30,31,32]}
so where do I add the bit you are saying?
Hi Jenny,
You’ll need to create a custom template to implement this. I followed up with additional information via email.
Do you know if there is a way to include the custom template via a different method. I’d prefer to be able to add this via the Snippets plugin.
We’ve already followed up via email, you should be able to add different templates with different names and call each one only when needed using the Custom Template.
Best,
Hi, Thanks for greate job. I did all steps and every things work fine. But after updating the gravityform to the version 2.7.8, it does not work. Did you test it with the Gravityform v.2.7.8 ?
Best regards, Masu
Hi Masu,
I just tested with the latest version (2.7.10) and the All Fields Template works in all my tests. If you’re a Gravity Perks customer, drop us a line. We’ll be happy to troubleshoot this with you.
I have 2 html fields – header and footer. Issue is the notification is displaying both html fields first before any other field. I used the all fields code above with the html field id’s but that did not work. How can I manually add header html code first, then add other fields and then add the footer html tag?
Hi Bruno, this will probably require some customization of the All Fields Template. If you’re having trouble using the snippet and are a Gravity Perks Advanced or Pro customer, reach out to support. We’re happy to help.
Hi, thank you for this promising tool for free. I downloaded, installed, and activated the plugin. I unzipped the template file and uploaded it to the active child theme’s directory. I have the GF confirmation set to show {all_fields}. I’ve tested the form twice and it still shows the tragic GF default blue and plain box. What did I miss or do wrong?
Also, is there a way to use this template to send fill out the email confirmations/notifications so we don’t use the fugly GF all fields data box?
Hi Chris,
Is the sample template file located in
/wp-content/themes/{your-theme}/gravity-forms/
? The full path should look like this:/wp-content/themes/{your-theme}/gravity-forms/all-fields.php
The All Fields Template will replace all instances of the {all_fields} merge tag, including email confirmations and notifications.
Thank you, Scott!
I cannot reply to your message so I’m replying here to mine.
Previous, I followed the directions above for Step #2 Download the sample template directory/file. Add the folder to your active theme’s root directory: /wp-content/themes/{your-theme}/
I had uploaded the PHP file to the active theme folder.
This time I created the GF directory and put the PHP file in there:
/html/wp-content/themes/**********-child-theme/gravity-forms/all-fields.php
But when I submitted the forms I still got the GF all fields table :(
Thoughts? Chris
Hi Chris,
Do you also have the Gravity Forms All Fields Template plugin activated on your website? In addition to adding the all-fields.php template file in the Theme’s folder, you also need to download and install the GF All Fields Template plugin to get it working.
Best,
Samuel, thank you for your response. Yes, the plugin is installed and activated. This is a WPMU WordPress Multisite (network) so maybe the plugin does not work in this environment?
Hi Chris,
The All fields template plugin should work with WPMU. If you have an active Gravity Perks license, send us a message via our support form and we look into this further for you.
Best,
Your “provides a super simple way” is just misleading. This is far from easy. When you have to FTP files to the server and then work with PHP code – you can’t call it “easy”.
Sure I know how to do all this, but it is a pain in the butt.
But you are giving it away for free. So I am not complaining. But just saying, this is not easy.
Easy would be a UX dashboard, drag/drop interface, check boxes, WYSIWYG editor. That is easy. But having to upload to the server and customize PHP. This is not something ANY of my clients would do.
Just saying…
Hi Steve,
Thanks for the feedback. If you reread our opening sentence, it should be clear that we are referring to the
{all_fields}
merge tag being super simple. It is functional in its simplicity, but it doesn’t offer any customization.This plugin adds templating support for that merge tag. Unfortunately, custom templating isn’t simple by nature. We do have some merge tags that add capabilities for filtering without having to touch code, but the expectation is that you’re a developer if you’re writing fully custom templates. For your clients, we do offer support for our plugins. If you or they have a Gravity Wiz license, reach out to our support team, and we’ll gladly offer our guidance.
Hello, Is there a way to make this plugin work with Oxygen Builder ? Oxygen completely disables the WordPress theme system I do not know where to put the “all-fields.php” template.
Thanks
Hi Caroline,
Here’s a snippet that will let you add a custom template path. In this example, I’ve created a folder in the WordPress plugins folder titled “your-plugin”. In that folder, I have my all-fields.php template file.
add_filter( 'gwaft_template_paths', function( $file_paths ) { $file_paths[0] = WP_PLUGIN_DIR . '/your-plugin/'; return $file_paths; } );
This should get it working.
Best,
Does this plugin work with PHP 8.1? I just tried to install and got dumped to a 403 page. I haven’t checked the logs yet.. just thought I’d ask if it’s known-compatible with 8.1 or not.
Hi Mike,
I just tested with a PHP 8.1 installation and didn’t incur any errors. There’s likely something else at play. If you’re a Gravity Perks customer, drop us a line and we’ll be happy to dig into this.
I’m using the Gravity Forms Advanced Phone Field plugin, which stores the phone number in a number-only format (no (555) 555-5555 format for the US). Can this be used to format the output of that number in the {allfields} merge tag using the template? I have a client that has requested this.
Hi Dax, we’ve already followed up via email. This should be possible with the Phone Meta Merge Tag modifiers:
https://gravitywiz.com/documentation/gravity-forms-advanced-phone-field/#phone-meta-merge-tag-modifiers
Best,
For some reason we’re getting bullets on each line in Outlook, Gmail doesn’t show the bullets. I’m confused where they are coming from since list-style-type: none is already part of the default template.
Looking for the {all_fields} to visually look like the demo (simple and clean), default template provided. Bonus would be if we could increase the line height between entries. We’re using chained selects and none of the styles in the array seem to effect that section either (simple stuff like trying to change the font-size).
Hi Shane,
Unfortunately, this is an issue with Outlook. Even when an inline style is used to remove the bullets, outlook will remove the inline style.
Best,
Samuel Bassah says
March 21, 2023 at 1:50 pm
Hi Shane,
Unfortunately, this is an issue with Outlook. Even when an inline style is used to remove the bullets, outlook will remove the inline style.
Best,
Samuel,
Thank you for the response. Is this just an issue with Gravity Forms and Outlook then? I don’t see bullets in styled emails I get from any number of companies (order confirmations, form submissions, etc.). I did find some posts using CSS to remove the bullets but couldn’t get it to work.
.gform_body li {background-image: none;}
For the other issue, changing the font style/size in the array doesn’t effect dropdown or select sections. In our example this a consent checkbox and a chained select field. Is there a way to target those fields?
Hi Shane,
The bullet has to do with how Gravity Forms outputs the content of the {all_fields} merge tag, and a possible solution will be to use inline styles to overwrite this. However, I’m unsure how else you can remove the bullets because Outlook removes inline styles. Regarding the other issue, the styles within the array apply to all the field values. If you want to target a specific checkbox field or field type, you’ll have to write some PHP within the items loop and use item[‘field’] to get the field and check if it’s the field you to apply the specific style. If you have an active Gravity Perks license, you can contact us via our support form, and we’ll be happy to assist you further.
Best,
Some styling tips would be awesome. Was trying to get rid of the dated default Gravity output with the alternating table color look and this did that perfectly but I’d like to change the font style to a sans-serif and some other small visual stuff. Adding the font-family property here didn’t seem to work. Not sure where else to put it.
// Change the style a bit for Section fields. if( $field->get_input_type() == ‘section’ ) { $styles[‘li’] .= ‘background-color:#f7f7f7; padding-bottom: 10px; font-family: Arial, Helvetica, sans-serif;’; }
Ha! I’m dumb. I’m also a graphic designer messing with code I don’t understand. I figured it out, the template clearly states the styles are defined in the array. Once I added the property to the “ul” in the array it worked. Thanks again for this!
The client I’m helping is a Gravity Perks Pro sub and sent me here 100% confident you’d have a solution and you did.
Glad you sorted this out Shane!
Is it possible to basically keep the same layout as the regular {all_fields} tag, but show all product fields as regular fields? Not the order summary? I have to use the product field type to use the inventory plugin for limits, but it’s a reservation not a actual order so I don’t want the order summary. However, I still want to only show what is populated. Thanks!
Hi Justin,
You can use the nopricingfields modifier of the {all_fields} merge tag for this. So something like this, {all_fields:nopricingfields} should work for you.
Best,
Hi, Is it possible for the default template to include all forms html blocks? I have 80+ forms tha I need to include the html blocks… it will take quite a while to amend each to include the new merge all field tag.
Thanks Tony
Hi Tony,
You can add this code snippet to your functions.php file and the modifier added to their {all_fields:allowHtmlFields} should now include all HTML fields by default.
Please note that this does not require the All Fields Template to function unless you need the All Fields Template for something specific. I hope this helps.
Best,
Hi Samuel, Thank you for the snippet, that works. I was hoping for a quick fix though so I didn’t have to change the tag on every form (Current tag = {all_fields}
Thanks Tony
Hi Tony,
Sure, can you give this snippet a try. This should work with the {all_fields} merge tags without any modifier.
https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-include-html-fields-in-all-fields-merge-tag.php
Best,
Perfect!! thank you for the quick respone, just what I needed
Best regards Tony
Hello there!
This script is really helpful and fills a great gap using GF. However is there any chance to create conditional output for certain fields? I’m trying to create alternate styling for fields within your provided starter template for certain fields depending on their ID. Is there any chance to achieve this?
Thank you
Hi Gordon,
This definitely would require some customization to the code snippet. If you have an active Gravity Perks Pro license, you can get in touch with us via our support form so our developers can have a look into this.
Best,
hi guys,
has anyone ever built a template that displays the entries of the nested form like this:
Label1 Label2 Label3 … Value1a Value2a Value3a … Value1b Value2b Value3b … Value1c Value2c Value3c …
does anyone have a tip how i can change the template to this? that would be great – thanks a lot!
…now it has destroyed my formatting in the post. so the labels as a header at the top and then the values below each – if possible not as a table
Hi Bernad,
We have a snippet that displays the Child entry data in a table format, with the labels as the header and the value below each. https://github.com/gravitywiz/snippet-library/blob/master/gp-nested-forms/gpnf-display-child-entries-table-format.php
How do I install a snippet?
I hope this helps.
Best,
Is the plugin download no longer supported? Both the plugin button and the download link just refresh or are anchored on the same page.
Hi Teri,
It seems to be working when testing. It will show a popup to download the plugin.
Another option would be using the View Code button.
Best,
I’m trying to include the contents of a dynamically-populated table (that resides in an HTML field and updates via jQuery), but the only output is the HTML block name and table’s header column names. Is is possible to also capture the table content? If so, is there a way to specify which columns are included/excluded from the notification?
Hi Ryan,
From what I understand this is not supported out of the box and it will require some digging by our Dev team. We’ll be happy to investigate this if you get in touch with us via our Support Form.
Cheers,
Currently I’m handling this by adding the table content (rows) to a hidden textarea via jQuery. It works well and allows me to specify the data that gets passed to the notification, though it also requires a custom script for every form.
Sorry @Dario, I didn’t see your response before I posted a follow up. I’ll send this through the support form.
HI
Is it possible to change the titles to french titles with the plugin ?
Hi Itshak,
You can’t use the All fields Template plugin to translate the Perk tiles. You can however use Loco Translate to translate our Perks. It can generate .po files from our Perk’s included .pot files and doesn’t require using third-party software to convert files.
Best,
Issue – product field values are passed with label, qty, price.
So the price is visible in the product “value” anyway, which means it will show all products (even those not bought).
Hi Kos,
This is how Gravity Forms handles Product fields by default. If you have an active Gravity Perks License, you can get in touch with us via our support form so can dig into this feature.
Best,
Is there any change this does not work when you are using a sage-theme with bedrock? the structure for a theme is different with these themes and for some reason, even if I put the template in the root folder is does not work. I tried the theme root, the resources folder and recourses/views/ no luck.
It this plugin even working on the newest gravityform?
Hi Tim,
This plugin works with the latest version of Gravity Forms. I’m not really familiar with the sage-theme with bedrock. If you have an active Gravity Perks License you can get in touch with us via our support form so we dig into this further.
Best,
Is there an easy way to change the formatting for one field? I’d like to CC emails included in a nested form e-mail field, but with the list formatting I suppose that wouldn’t work.
Hi Noel,
I’ve sent you an email to request additional information on your request. Please check and reply.
Best,
Hi,
Great plugin! Really helped me include HTML fields in the form notifications.
I’m having an issue where there is an additional empty bullet point showing up the form notification – I was wondering if this is a known bug? Or an error on my end?
Here is the html section that the extra bullet point is appearing under (only in the notification email): https://snippi.com/s/q5jfcm0
And here is the form itself: https://www.ourauto.co.nz/contract-form/
Let me know if you need any additional information, and thanks again!
Hi Will,
It could be that there is an HTML missing in the snippet provided. There shouldn’t be any extra bullet points when using the All Fields Template merge tag.
If you have an active Gravity Perks License, you can get in touch with us via our support form with your account email address and we’ll be happy to dig into this further.
Best,
Hi,
how can I filter a column in a list-field?
Hi Ralf,
It appears this is currently not supported. If you have a Gravity Perks license, you can get in touch with us via our support form with your account email, so we can forward this to our developers as a feature request.
Best,
Hi I just saw the update on this and tried to use the nested forms filtering, but when I filter to [0] I get a list. When I filter to [1] or [2], or [3], etc they all work fine. How do I get a result from the first entry?
sorry I mean index. The filter part is working just fine, but when I index [0] I get a list instead of a single field
Hi Mike! This specific issue has been resolved in the latest version of GP Nested Forms (1.0-beta-9.16) which will be publicly available Tuesday 3/30/2021.
I’ve sent you an advanced copy of that build via email for the time being.
Have a great weekend :)
Would this allow me to export my form’s HTML blocks in my notification emails?
Hi Amanda,
Yes, the snippet can allow you to display the HTML blocks within notifications. Once you have the snippet installed, you should be able to use the “include” modifier to output the HTML fields in notifications. The include modifier is written in this format, {all_fields:include[1,2]}, where 1 and 2 are the IDs of the HTML fields you want to include in the notifications.
Best,
I would just love to see notification-email content wihtout the labels of the form fields or without the blue bars in the mail-notification.
Isn’t that possible even without this plugin?
Hello Karl, this is a great question. The all fields template will allow you to take over what is displayed when using the all fields merge tag. You can choose to display value only and not the label. As for blue bars, I am not sure I follow. If you mean each section that is shown and the css behind it , you can customize this within the custom templates we provided. 🙂
Hello
Firstly thanks for the plugin. I followed steps 1-3 (but didn’t edit the template) just left it as is
However, it still only outputs the basic form fields (not all the HTML) in notifications. Am I a dummy?
Hello Peter, This is a bit of a strange one as the include should cover all fields including the HTML. Please note that you do not have to upload the theme and only have the plugin installed for this to work. Go ahead and try just having the plugin and the shortcode. Let us know the results.
Is it possible to get the dynamic confimation text of a child form merged to the confirmation text of the parent form?
Hi Konstantin,
The All Fields template supports Nested Forms in all places the merge tag can be used, which includes Confirmation pages. If you have further questions, drop us a line in support and we’ll be happy to help!
Are shortcodes supported in the HTML fields in terms of sending their rendered data to the notification? I am working with one specific shortcode that renders fine in the HTML block on the page, but when I send the notification, it comes across as “no data found” which is an error message related to that shortcode…
I have also used the gform_pre_render function to add content to the HTML field, and the notification doesn’t recognize the data sent by the pre render function either.
Hi Cameron
I’ve replied to your question via email so that you can send us an export of the form.
Best,
Hi Ryan, I am using this plugin to create multiple nested forms in gravity form. I need to send all the form data including nested forms[ If the user filled multiple times ] to Salesforce using API. How I am able to get all nested form data in the gform_pre_submission function? Please help me Here is the form link:
Hello Atul, Thanks for reaching out. This looks like it will need a deeper dive to fully understand. If you have a Gravity Perks account, could you please reach out to us via our support channel found here and we would be more than happy to help you out with this one.
Hi, I have installed your plugin to work alongside gravity forms.
I have a number of HTML fields on my form, inside these I generate a table for a user to enter data into.
I have managed to use your plugin to show the tables in the email notification sent to the business, however, the user entered data does not show on the email and I cannot find it stored on the entries.
How can I push the data they enter in the table into my email notification?
Thanks, Dexy
Hey Dexy, You can add this code to your functions.php file and the modifier added to their {all_fields:allowHtmlFields} should now include all HTML fields by default. Please not that this does not require the All Fields Template to function unless you need the All Fields Template for something specific. So please give this a try and let us know if this would work out for you.
How to show gravity form nested form field (summary only ) as table layout in a gravity pdf template?
Hi Sheikh,
GravityPDF has an article on how to display the Nested Forms table within GravityPDF. Please check it out here: https://docs.gravitypdf.com/v5/how-to-display-the-nested-forms-table-shown-prior-to-v5-1/
Best,
I’m looking for a way to hide just the prices in the notification email without hiding the order items. I thought the {all_fields:nopricingfields} might do that but it hides the entire order section.
The prices will be displayed at some point in the future and we need to hide them for now – a custom quote will be generated by the sales person.
Any guidance is appreciated.
Hi Dann,
This isn’t supported in the All Fields Template, however GF eCommerce Fields supports outputting custom markup for the order summary using this hook. Use the examples as a starting point and customize as needed.
What I’m trying to do is to show all HTML fields when using {all_fields} in a notification email to the administrator.
I still can’t figure out how to do that.
I’ve seen this part:
{all_fields:include[1,2]} Include a field that is not included by default (i.e. HTML fields).
Isn’t there a way to just include ALL FIELDS without having to list all of the fields that normally don’t show up?
I would have to list about 100 fields!!
That’s really what I’m looking for… just show ALL FIELDS.
Hello, That is a bit of a strange one as using the {all_fields:include[1,2]}. This should include a field that is not included by default like your HTML fields. Of course, you could take it a step further and customize the template fully by downloading the templating files and saving them to your root folder, then customizing them to meet your needs. Do you currently have a Gravity Perks license? If so we would be more than happy to take a deeper dive into this for you. Please reach out through our support channel here.
I have a conditional logic HTML that shows an image.
I use include tag but the image is not included in the notifications using this.
Any help will be appreciated .
Thanks .
HTML fields are display only fields. They aren’t saved in the Form Entry, so they won’t display when using the {all_fields} merge tag.
https://docs.gravityforms.com/html/#merge-tags
The exclude modifier does not work on individual pricing fields. It seems to can exclude ALL pricing fields but not single ones. i was using a pricing field to do a calculation for a another field, I just switched that to a number field instead. Not sure if this is a bug or the way it works out of the box. Cheers, great plugin!
Hello Shonari, Are you selecting the single pricing fields like this {all_fields:exclude[3,4]} and it is excluding all pricing fields or how are you using the exclude merge tag? Let us know so we could help you out with this one. 😀
hi! I am wondering if this plugin may sort my problem. I’ve installed Gravity Forms & the Product Addon for Gravity Forms for Woocommerce.
It’s working great with some custom code that populates a single text box (hidden with css not using the “hidden” tag on the form because that didn’t allow the form to populate!). The value of the box then shows/hides various parts of the form appropriately.
(customer chooses a product variant – one of four choices – the box is then is populated with 1,2,3, or 4, depending on the variant chosen.
2 of the options have further choices for customers to make, 2 don’t. This is working brilliantly.
Except in the order emails. Which are now the ONLY place (oh and on the pdf invoice) that this hidden box appears.. So the order emails both to the customer and to myself include “product variable: 4” which I’m fine with, but might be confusing to a customer.
I’ve downloaded the plugin, installed the template, but I must admit I’m struggling with exactly what to do next. There are multiple forms, so the box that needs to be hidden isn’t the same ID in each form, so it won’t work as a global “exclude” – that’s my first concern. My second is simpler – I just don’t know how to do it. I’m wondering if you can explain it more simply to a non-developer (although I’m pretty good at picking things up!)
Cheers Sarah
Hi Sarah,
The all_field merge tag will be inserted in the notifications setting message box, and in your case, you’ll need to use the Exclude modifier to hide the textbox field you don’t want the users to see. The merge tag will be written in this format {all_fields:exclude[4,5]}, where 4 and 5 will be the IDs of the fields you want to hide. You mentioned multiple forms, I’m not sure how you’re using the multiple forms together but if each form will send individual notifications, then you just have to insert the merge tag with the exclude modifier inside their notifications settings message box and edit the field ID to match the ID for that form.
In case this doesn’t work for you, then we’ll need a close-up look into your form set up to get a better understanding of your request. If you’re a Gravity Perks Subscriber you can send a message via the support form so we can assist you further.
Best,
Hi, where can I find the snipet to insert in the fuction.php file? I installed the plugin indicated, inserted in the all-fields.php theme file, but the snipet is missing as you indicated. Thank you
Hello Piero, Great question. You would have to install the plugin, Download the sample template directory/file. Add the folder to your active theme’s root directory found here:/wp-content/themes/{your-theme}/. Then you would just have to customize the template. No need for an extra snippet, just enter the customized template into your theme folder and you should be good to go!
{all_fields:include[1,2]} for the HTML part are we suppose to the change the 1 and 2 and if so with what?
Hi Jen,
1 and 2 are the IDs of the fields you want to include to the form summary, so you will replace it with the IDs of those fields.
Best,
I have 3 fields in my contact form. First field ( Name = {Name:1} ), Second field ( Email = {Email:2} ), Third field ( Message = {Message:3} ).
I ready the Hide Pricing Fields section. when I try to hide my email field then I failed. this section was telling when I use {all_fields:nopricingfields} this will hide pricing field. but I am trying to hide my email field. then how syntax will be for the email field. from yesterday, I am trying to fix it. kindly tell me the correct syntax.
Hi Zubair,
Could you give this merge tag {all_fields:nopricingfields,exclude[2]} a try and see if it works for you? 2 is the ID of the Email field.
I hope this helps.
Best,
HI there. I the code you can put an Isset to avoid error´s.
Like this “if( isset($_modifiers[‘filter’]) ) {…”.
Best Regards.
Hello João, The usage of an Isset should work just fine.
Hi there,
Can i achive the following?
What i’d like is to align my nested form entries in the client notification as seen in image 2 – at the moment the client notification shows as image 1
image 1: https://siteforms.ie/wp-content/uploads/2020/07/1.jpg image 2: https://siteforms.ie/wp-content/uploads/2020/07/2.jpg
any help would be much appreciated
regards
Tom
Hi Thomas, We have a snippet that will output the Nested Form Field as a table in Notifications which is similar to image 2. You can use it with the All Fields Template, however, it doesn’t require it. I hope this helps.
Best,
Hi Samual,
thanks for that, I’ve created a new template called all-fields-custom.php and have added the snippet, but all i get back in the notification is blank.
In the notification section i’ve added this {all_fields:template[custom]}
i’m obviously missing something here?
regards
Tom
Hi Thomas,
You have to insert the snippet in your theme’s fucntion.php file and use the {all_fields} merge tag. Please refer to our article on snippet troubleshooting for details on installing our snippets.
https://gravitywiz.com/documentation/snippet-troubleshooting/
Best,
Working now and exactly what i needed – very much appricate the help there Samuel
regards
tom
Hi Guys! Thanks for your awesomeness. This is a great plugin but I am not sure if it will do exactly what is required for a current project. We have a fitness centre that services drop ins and members. Drop s ins have to pay while members do not. In GF everything has been created beautifully except {all_fields} which I love the style of. Is it possible to do the following…
Non- Members outputs perfectly as is using {all_fields} Members would output exactly the same WITHOUT any pricing visible.
I’ve tried this a couple ways now using this plugin but cannot quite reach my goal. Essentially what I am trying to do is maintain the table style for both outputs but remove prices (not product details) from the “Members” confirmation & notification only.
Thanks in Advance for any wisdom,
-R
This is working like a charm for us when used on a form submit preview page… in default (english) language. However, when filling out a translated form (we use WPML), the preview is all in english.
How do we get the translated field labels to show?
Hello Regs, what labels are you attempting to translate? Also, have you tried using the string translations plugin with WPML?
Hi Ryan,
The fields are already translated. Issue is that the translated fields do not show when viewing on a non-english form preview page
{all_fields:nohiddenvisibility}
I second Laurent’s inquiry. It would be a great feature if descriptions could be included in the shortcode. Thanks for all you do!
Hello Wil, This is a great request. The GF_Field label does include a “Description” field object string that can be displayed on the all fields tag. With that being said, are you only attempting to show the description of a specific field or are you trying to add it to the All Fields template?
Hi David,
Is it possible to target/include a field description?
Eg. I have field 34 that is a product option. I would like to include its description. Something like {all_fields:include[34:Description]} ?
Thanks, Laurent
Hello Laurent, thanks for writing in. Sadly that merge tag would not work in this case. You could customize the template and include the GF_Field label. This does include a “Description” field object string that can be displayed on the all fields tag. 😃
Hi guys,
Excellent, very promising !
In case of the dropdown field, I would like the all field merge tag to display the dropdown choice “label” rather than its “value”.
Is it doable ?
And is it doable within the all field merge tag ? imagie I want to dispaly field 1, 2, 3 value, and field 4 dropdown label and not its value. Coud be something like {all_fields: filter[1,2,3,4:label]} ?
Thank’s in advance
Hello Jb, Excellent questions. First, you can use $item[‘label’] for the field label instead of showing the “value”. As for your second question, {all_fields:filter[4],label} should display the label field for your 4th selection. Please let us know if you have any further questions! 😀
I am very interested in this. We have long forms that have modified over time and we want to control what order the fields show up in the emails. Example: The terms and conditions field ID is lower than newer more important fields. We want terms to show at the END of the email but they are showing up as the first field. Can this plugin be used to set the order of the fields?
Also, some of our field content is generated by a shortcode in the value. Can we force the shortcode to process before outputing to the email? Right now we just see the name of the shortcode, not the resulting content.
Hello Karena, This is an excellent question. Could you please let us know what terms of service plugin you are using as well as what shortcodes plugin you are using? If you are currently a Gravity Perks License Holder could you drop us a support request for this? We’ll be happy to dig in.
When I invoke the all_fields merge tag and use the :nohidden modifier, the custom output does not hide fields that are marked as hidden. Am I doing something wrong? Thanks!
Hello Colin, Excellent question. You’ll want to use the :nohidden modifier on the {all_fields} merge tag.
{all_fields:nohidden}
More details here: https://docs.gravityforms.com/merge-tags/#options. If you are still having issues after using the modifier this way, could you please drop us a support request. :)
Sorry, I don’t have a Gravity Wiz account, so I’ll have to post it here.
I am already using the {all_fields:nohidden} merge tag, but the output still does not hide the hidden fields. I found a possible cause:
Line 374 of gw-gravity-forms-all-fields-template.php uses this code to check if a form is hidden or not:
RGFormsModel::get_input_type( $field ) == ‘hidden’
This looks like the wrong thing to check, because get_input_type() is returning the type of field, like ‘number’, ‘name’, ‘phone’, ‘address’, etc. However,
$field->visibility == ‘hidden’
seems to work as intended, returning ‘hidden’ when the field is hidden, and the output is now hiding the hidden fields as desired.
Does this make sense? Thanks for your help!
I think I found the answer to my own issue: I have been confusing the “hidden” field type with the “hidden” visibility option. This explains why
RGFormsModel::get_input_type( $field ) == ‘hidden’
is there in the first place. This is making more sense to me now.
Hi there. I’m currently working on a producing a notification which outputs each of the nested field entries along with the parent content. However, the most I can seemingly drill down is to each field, generating an unordered list of each entry
ex: {nested_field:1:filter[5.1]}
Output:
*entryOne *entryTwo *entryThree …
Ideally, I’d like to populate a table row with each entry, but I’d settle for being able to properly style each list item. Problem is, I can’t seem to set the list-style-type to none.
Any suggestions would be greatly appreciated!
Thanks.
Hello Chad, Awesome question.😁 We actually do have another snippet that would display table format for All Fields. Give that a try! 😀
Hi there,
Thank you for this excellent plugin, whose functions should have been part of Gravity Forms from the start.
It helped us to bring the confirmation and notification into the desired form, except for the following points:
The formatting applies to all fields, except at the end of the form for “Order Summary”. This formatting remains unchanged, but does not correspond to the rest of the form. Is there a solution to control the formatting of this area?
The term “order summary” is not translated into other languages. We use the form in German and tried to translate the term using Loco Translate, but it cannot be found in the Gravity Forms language file. Is there a way to control / replace label output?
Many thanks for the help!
This plugin does not offer a way to customize the order summary. We are considering that for a future release.
is it possible to filter a “price field” from a nested form in the form notification? I am able to get all of the fields to work except the price-based fields using the {Nested Form:1:filter[4,5]} merge tag. Thanks for any help!
Hi there, Hi David. Unfortunately I have the following problem and I can’t get any further. I’m trying to do a knowledge query through Gravity Forms Quiz. For this I have created checkboxes with different answer options for a question. The checkboxes (answer options) can be checked by the participants. By submitting the form, it is evaluated simultaneously and the participant can directly check whether his answers are correct or not. Unfortunately, the subbmission layout is very confusing. I would like the checked checkboxes to remain checked and not to disappear. How can I best implement this? Thank you very much for every answer. Greetings Jakob
Hi Jakob, we don’t have a ready solution for this. The template modifies how the values are presented on the page, but it doesn’t modify the values themselves. Gravity Forms core determines what is output for
$item['value']
.I’m trying to use this in combination with the Preview Submission perk but it’s not picking up my custom all-fields.php template.
So I guess my question is: should the all-fields plugin work in combination with the Preview Submission perk?
It should just work. Could you submit a support ticket? We’ll be happy to take a closer look.
Hi David, thank you for your replies, much appreciated. I’ll create a ticket.
Also, Is it possible to create templates inside the child theme? or should I place the folder ‘gavity-forms’ inside the parent theme?
Templates work in both the parent and child theme folder. I would suggest the child theme.
is it possible to combine these two merge tags? {all_fields:template[custom]} and {Nested Form:1:filter[4,5]}
Yes, you would need to target the Nested Form field ID and the specific child fields you want to filter. Something like this:
{all_fields:template[custom]:filter[1.4,1.5]}
Hi David,
Thank you for reading my question!
i’m not sure what i have done wrong. now my form meta is modified by the entry data.
for example, in my form, i have used {all_fields} merge_tag, but once i preview the form, enter some value in the form, before submission, and then when i refresh the form editing page, my merge_tag become a hardcoded html section.
Do you happen to know what might be the root cause? Thank you!
Hi Steven, this does not alter the form meta in anyway. It’s possible you have some code running that is saving the form meta at a time that it shouldn’t be. I’d recommend running a theme/plugin conflict test to determine what is causing the issue: https://docs.gravityforms.com/testing-for-a-themeplugin-conflict/
Hi David,
i found the root cause. it was caused by a third party plugin called
gravity_forms_mc_unique_id_generator
deactivated and deleted.
You saved my life. Thank you soooooo much!
Is there somewhere i can follow you, GitHub , Twitter? Thank you!
Hi Steven, glad to help! You can follow me personally at http://twitter.com/spivurno and Gravity Wiz at http://twitter.com/gravitywiz
Hi, great plugin.
It’s possible to customize the template or use the default GF modifiers :admin (uses the fields Admin Labels rather than the default field labels) and :value (displays the actual value rather than the corresponding value label, best for checkboxes radio buttons and drop downs)?
Thanks
This should automatically work with Gravity Forms’ existing modifiers. 🙂
Hello there,
I have a bit of a complex form, so towards the end of the form I have a “Preview” of all the fields they filled out. My form has a nested form and I’m trying to determine how to exclude certain fields from the nested form from appearing in the {all_fields} merge tag. I’ve been able to successfully exclude other fields from the parent form, but how do get those specific nested form fields to be excluded as well? Any help would be greatly appreciated.
Hi Dakota, before I elaborate, I just wanted to make sure you had seen our “GF Nested Forms Support” section above? If so, I’ll be happy to clarify further. 🙂
David,
Yes, I did see and follow that section and it helped a lot. I’m wondering, however, if it’s possible to hide only specific fields from the nested form, and that the nested form would still appear at it’s appropriate place in the preview? Right now I have to essentially add the nested form after the parent form. Does that make sense?
This example demonstrates how you can target specific fields in the nested form as part of the {all_fields} merge tag:
{all_fields:filter[1,2,3.4,3.5]}
Note the the field IDs here are:
1
,2
,3.4
, and3.5
. The 3 is the Nested Form field ID and the 4 and 5 are the fields on the child form.David,
I’ve tried this, and just tried again. It somehow manages to exclude the entire nested form fields, rather than just the specific fields I wanted to exclude.
We’re having the same issue…excluding some nested form fields on the parent hides the whole nested form from the notification.
Hi Conor, using the
:exclude
modifier on the{all_fields}
merge tag excludes the whole field. Use the:filter
modifier with{all_fields}
to specify which child fields to display.:include
,:exclude
, and:filter
modifiers are fully supported when using the Nested Form merge tag.Does this work for nested forms? My nested forms aren’t taking the style changes …
Hi Dave, Nested Form fields within an {all_fields} merge tag are not affected by an All Fields template. Check out Nested Forms templating for the best way to change the output of a Nested Form field: https://gravitywiz.com/documentation/gravity-forms-nested-forms/#templating
Hi there, thank you for a great plugin! Wondering though were to put the template file when using Sage by roots.io, can you perhaps shed some light on that?
Thanks,
Hi Henk, assuming that Sage is a theme, it would go in the same location as other themes. Right in the theme root:
/sage/gravity-forms/all-fields.php
.Hello, I want to exclude the price and total field from the survey displayed with {all_fields}. I used the modifiers with {all_fields:exclude[X]}, but still get them in my survey template. (I already have the plugin “Gravity Forms All Fields Template” installed.
Is there something that Im missing? thank you in advance.
Hi Youssra, pricing fields work a little different than other fields and are not filterable via this plugin.
I’ve created a form using the products field but I only want to display quantities not unit price, price or total. Is this possible using this plugin and if so what would be the best way to go about it?
Hi Karl, this plugin does not offer a way to customize the order summary. Something we’re considering for a future release.
I downloaded this plugin in hopes that I can change the background colors. I want the I think I am missing a step somewhere. I want only certain fields to be in color. The rest to stay white.
Thanks
Kristen – are you referring to having certain fields have different background OR text colors?
example: Name field has black text, and white background. While Email field has blue text, and green background.
If so – then you just want CSS changes. Example: (look in the CSS section of my code) https://codepen.io/rockykev/pen/xxKpQpK?editors=1100
You’ll have to learn a bit of CSS (each form item has a unique ID), and a way to put it on your page (I use a WordPress plugin for at.)
Section fields set to Administrative for visibility do not appear on the {all_fields} even if included using the {all_fields:include[#]}.
If I enter a description, it does show up so but the label is still not present.
Thanks for the note, Mike. This is something we’ll take a look at for the next version.
Hi I am a web developer and upgrading a clients WordPress theme and starting fresh by moving it to a new host. The previous web developer created a quote generator using gravity forms and had the “Gravity Forms All Fields Template” plugin installed and an all-fields-php file in the theme folder. I imported the gravity form, I copied the all-fields.php file to the theme folder under /your-theme/gravity-forms/all-fields.php and still I cannot see the table.
Instead I just see a shortcode {modified_order_summary} where the table should be. You can test the working form here https://weddingspartiesentertainment.com.au/packages/ and the one at the new theme here. http://weddingparty.wpengine.com/packages/
What am I doing wrong? Had 3 or 4 coders look at it and not able to work it out.
Hi Paul, I believe there is some other code that is handling the
{modified_order_summary}
merge tag. This is not part of the All Fields template.Ahh thank you very much for the quick response. I will look into it.
Is there a way to exclude the autogenerated Total field from the standard {all_fields} template without having to adjust the php code?
I have my own total field that is showing in the pricing section, but I don’t want the final “Total” field to show.
Any help would be greatly appreciated!
Currently there is no way to remove the order summary from the {all_fields} output. It’s something we’d like to do in a future release of this plugin.
This could be a very valuable addition to the Gravity Forms toolkit, especially considering how conspicuously undeveloped this area of GForms seems to be.
My initial obstacle in getting the modifications I need concerns display of “all fields.” In short, we have a complex field that combines multiple sub-fields to produce a total price. The default Order Summary does not display the prices of individual items, and the $items array used by your template doesn’t seem to contain any information about these fields whatsoever. However, when I do a var_dump of $items, the info that’s printed in the email is lacking in a number of ways, so I wonder whether some other logic is acting on the variable here.
Which brings me to the second limitation: The only obvious way to get a preview of the notification is to re-submit it, then find the output in an email (or email log).
The third initial issue is that, when I enable your plugin, one of two notifications – the one lacking the “all fields” tag – fails to send at all.
So, I’m struggling here…
Hi CK, this solution is pretty simple and provided as-is. Gravity Forms doesn’t provide a great way to replace the {all_fields} markup and provides even less support for replacing the order summary markup which is part of the {all_fields} markup. We’re certainly interested in improving this solution but it is, admittedly, a low priority.
We don’t have a solution for previewing the notification either. That could be a big help. There are no known issues with this plugin interfering with emails being sent.
Hi this looks exactly what I need, I can view the php and all I want to do is put a line break in for each section (it currently posts fine just <Strong> text for headers but no line or paragraph formatting. I’d just like the strong header and then the input then a line break for each section. Would this be difficult?
Sorry I didn’t realise that would pick up the html for ‘‘
Hi Garvan, doesn’t sound difficult at all. Go ahead and implement the template and let us know how you get on. ?
Hi David. As always, great stuff. Thank you.
With this plugin, is there any way to show HTML fields if, within the form itself, they only show conditionally? In other words, is it possible to show them in them in the output only if they show in the form when completed by the user (whether they show depends on answers to prior questions)?
Thanks Richard
Hey Richard, this would require additional customization; it’s probably the desired default functionality and definitely a feature we would consider for a future version.
Thanks for the quick reply David. It’d be great if GF could do this in some shape or form. GravityPDF does it beautifully out of the box, and we can achieve a similar HTML output with GravityView. With GravityView, though, one needs to spend a lot of time configuring custom content outputs with conditional tags. The larger the form and conditional HTML fields, the larger this job becomes, and the more difficult it can get to keep the PDF and HTML outputs in sync. It would be awesome if GF could simply emulate what GravityPDF can do. We could then quickly show, through the all fields merge tag, only those form fields that have inputs (empty fields being ignored) and any HTML fields which show based on satisfaction with prior conditions. I can see many use cases for this. Anyway, perhaps wishful thinking for now, unless perhaps I have someone write a plugin for it. Do you think that would be a big job? Thanks.
You could feasibly use the conditional shortcode and multiple instances of a filtered
{all_fields}
merge tag. Sounds similar to what you’re doing with GravityView. Certainly wouldn’t be pretty…With that said, it wouldn’t be hard for someone to extend the All Fields Template plugin to support this.
David, I believe I’m in a similar boat to Richard here & wanted your thoughts. I have a pretty large multi-step form that has a lot of conditional formatting. Could I use this plugin with the conditional shortcode to build just 1 email notification that utilizes a custom template along with the all_fields merge tag to get my desired outcome? I don’t want to be maintaining different email notifications that are sent if a specific option is checked. I would prefer that they are all maintained within 1 notification.
Thanks!
The short answer is yes. This gives you complete control over the output of the {all_fields} merge tag. As long as you comfortable working with basic PHP, you should be good to go. ?
Hi David. Just wondering whether you guys would be willing to make this modification? If not, I may approach a developer. Cheers.
In case it’s unclear what I mean, I’m looking for the ability to:
I’m hoping there’s a way that this can be done without create a conditional statement for every single field. Some of my forms have hundreds of fields so I’m looking for a more generic way of achieving this :)
Hi Richard, we really would like to add both of these features but we just don’t have the throughput right now. If you do hire someone, we’d love to incorporate their changes into this free plugin.
Thanks for your plugin! However, when I’m trying to change the wrapper of the table output..it’s doing nothing. Like want to remove the Form output border line or change its color to white. and want to move table to the left align with other text.
Please advise.
Hello, We have a complex form with many HTML blocks that need to be seen or hidden conditionally in Notifications and Confirmations. The plugin is working to show the HTML fields in Notifications, however the template is not being applied. The notification just looks like a normal Gravity Forms notification with tables instead of UL/LI that is in the template. I tried putting it up in both the root of the child theme folder and in child-theme/gravity-forms/template/ . The plugin is not working at all for confirmations, no HTML fields, no template.
Here’s the merge tag:
{all_fields:include[88,105,106,107,109,110,111,115,136,160,161,162,165,166,167,168,169,170,171,172,173,174,175,177,178,179,180,182,184,185,186,187,188,190,191,192,193,195,197,198,209,210,211,212]}
Do you have any thoughts on why this would happen?
Thanks
Hi Aaron, my local testing of this functionality is working as expected. I’m working with one user via support who is experiencing a similar issue as you. If I find out anything valuable while debugging, I’ll let you know.
Thank you, I tried disabling all other plugins and it still doesn’t work. I also tried using specific gravity forms merge tags combined with the filter option and disabling auto-formatting.
Like this:
The gravity forms specific merge tags obey the disable auto formatting option, but all_fields does not and gets formatted with the default values from gravity forms, not from the All Fields plugin template.
I am on WordPress: 5.1.1 Genesis Framework 2.9.1 Child Theme Php Ver: 7.1.27 Mysql: 5.6.23-cll-lve
Hi used the plugin works great, thank you as always though one thing the Address field moves the top line over to the right but the following lines of the address are indented to the left same with the ordersummary you can view a screen shot here https://pasteboard.co/HXWm95u.jpg.
Not sure what to edit to change this cannot do it with css as there are just unamed spans any help appreciated REgards Alistair
Ignore last comment found it
What pet do you have? 1. Dog 2. Cat 3. Parrot 4. Other
At the moment the email will just say: What pet do you have?: ‘3.Parrot’
I need it to show: What pet do you have?: 1. Dog 2. Cat 3. Parrot (Selected) 4. Other
Hi Fakhar, each
$item
has afield
key which would have all of the choices:$item['field']->choices
. You could loop through each choice and output the choice label and the “(Selected)” designator for the choice whose value matches the$item['value']
.Hello,
Thanks for providing this code. I have a rather specific scenario that I am dealing with which I wonder if you could help point me in the right direction.
The form we are creating has a few HTML blocks in it which are making use of merge tags to fill in text from the users input. i.e. Dear Mr {Name:2.2}, we would like to inform you … etc.
We are making use of https://gravitywiz.com/better-pre-submission-confirmation/ for this functionality.
In the summary for {all_fields} we are including these HTML blocks so that the user can see what they have agreed to / filled in before submitting. The merge tags in this preview are not replaced with the form values.
My question is, is there a way to convert the merge tags in this all_fields summary page? Is it then possible to submit these HTML blocks to the entry with the merge tags replaced with form values?
Thanks very much
Hi Joshua, hm, I don’t have a good answer on this one. It probably just isn’t supported. I can’t make any promises but if you’re already a Gravity Perks user, we’d be happy to see if this is something we could add support for to our Gravity Forms Preview Submission perk.
Hi David. I thought that would be the case. Sleeping on it seems to have helped. Having returned to the problem to see if I could attack from a different angle, it now all just works™.
So Good Job everyone! ?
Hi! I just downloaded the plug-in, but since I am not a programmer, I don´t understand the customization. I have created a form and the notification that the filler will get is too complicated. I would like to do it more simplier. Unfortunately I don´t understand tags and customizing the template at all.
I have done the steps one and two. But now, I don’t have a clue, where I will do the customization. I don’t need to make the form different, I just want to have the form that will be send to the form filler in the notification. I can find the Styles and Layouts for the Gravity Forms, but I don’t have a clue, what I need to change to effect to the notification email. There is no that option.
Hi Anni, it sounds like you might want to hire a developer to assist with this. The plugin is very barebones and is intended to serve as starting point rather than a polished solution.
Maybe I can use this plugin to solve my issue with the {all_fileds} merge tag? I have a form with various checkbox elements with various labels. Each label is set to the same value of “1”, but when I use the {all_fields} merge tag to preview the form or include the {all_fields} in a notification, because all the values are set to “1”, the output displays the first option label regardless of whether that is the option selected. Yes, I could set the value equal to the label, however I am summing the values to ensure that a minimum number of options are selected, hence them all having a value of 1. Is there a way around this where we can have the {all_fields} merge tag actually output the option label of the specific option and not the first one in the form field that has that (same) value?
Hi Tyler, Gravity Forms uses the value to uniquely identify the choice. You will run into other issues like this if your choices do not have unique values.
Your snippet here works really well, but a few pointers: – The template that you have made looks nice on the majority of email clients, but when it’s rendered in outlook for windows it’s getting butchered, doesn’t look right at all. – Email clients have come on a long way over the last couple of years, and now it’s pretty safe to use a style tag and classes throughout the document to style all elements, just avoid having multiple classes on elements as then outlook will ignore the extra classes.
Hi Geoff, we followed this guide from MailChimp when coming up with the sample template: https://mailchimp.com/help/css-in-html-email/ The good news is with this template, you can completely change how you handle the CSS to meet your preferences. ?
Great tutorial David! Thanks!
I was wondering if there’s a way to display specific items outside the loop. So let’s say I have made this simple template like you can see below. Is that something that’s possible?
And is it possible to then loop through the nested forms data and do something you can see a bit further down? So looping through it with a ready made template?
Cheers!
Hi Peter, the short answer is yes, you can modify the template and output markup outside the loop. I’m not sure I understood the rest of your question?
Hi David, thanks for this plug in. I have a form that all I want to do is wrap the phone number in an A tag with a tel: link to make the phone number clickable straight from the email. I’m a bit confused as to where this would be inputted in the all-fields.php file or if this is possible to do.
Thanks! Chris
I don’t think you need this plugin. Just add the markup around your Phone field’s merge tag. Example:
<a href="tel:{Phone:1}">{Phone:1}</a>
Hi. Thank you for the great tutorial. In my form I have created several steps. How can I display the fields by step and display the page name before the fields in each page? I would greatly appreciate any lead to improve the template.
The fields are already in order of their pages and the pages are each represented by a field on the form. You’ll need to loop through and output special markup to wrap the fields by their respective pages.
Thank you, David, for this excellent plugin and documentation.
FYI, in case it helps anyone else, if all you want to do is exclude or include certain fields in the {all_fields} merge tag, just install the plugin. You don’t need to mess around with steps 2 or 3 in the above tutorial — i.e., no need to create the folder and upload the PHP file to your theme’s directory. I may be dense but it wasn’t obvious to me, and I messed around with it for a while before realizing that it was possible to simplify. :)
Thanks for the feedback, Rob. I’ve added a note to this section that should hopefully make this more clear. :)
I wold like to exclude a pricing field used for calculations from the {pricing_fields} or at least from the {all_fields}… How I do that?
This isn’t possible with this snippet; however, here’s an example of how it can be achieved: https://gist.github.com/spivurno/35a6fe24accd961ded0cdc1e4b8ca987
I would like to use this merge tag with the Nested Forms plugin in the manner described in the docs there. It is unclear from the documentation where I use as similar merge tag to the example {Players:1:filter[1]}. Also, it’s unclear what is specifically referenced by “Players.” Is this the title of the nested form?
Hi Peter, “Players” refers to the field label of the Nested Form field that is on the parent form. The {Players:1:filter[1]}-style merge tag can be used anywhere that merge tags are supported in the scope of the parent form (notifications, confirmations, etc). Happy to answer any other questions you have via support. :)
I do not know how to create a template, so I am just using from out of the box. Do I go to the editor and create a template there – any step-by-step instructions I’d appreciate particulary with screenshots! Sorry I’m not that saavy with coding…
Hello. I’ve used CSS to style my gravity form fields into 3 columns, BUT when I get a copy of the submitted form notification, it does not show the 3 columns (as it does online). Gravity Forms recommended that I reach out to you for help on this. I have downloaded your plugin, but I need more guidance on how to do this. Thanks.
Hi Kat, I assume that you’re using a custom all fields template? If so, you’ll need to include your styles in the style attribute for each element. Most email clients will ignore a linked stylesheet or an inline style block.
I’m trying to add a little CSS to the submission with this plugin, but can’t quite get it to work. I’ve never done CSS through PHP, so I’m probably adding it incorrectly. I am able to edit the items that were already in the all-fields.php file by default, but can’t seem to get anything that I add to work. I’m just wanting basic things like alternated backgrounds on the list items, html headers to be larger and darker background, etc.
Hi Andy, we aren’t able to help with specific customizations of the template, but if you’re having trouble implementing the template at all and you’re a Gravity Perks customer, we’ll be happy to provide support via the support form.
Hello I need two ‘range slider’ and a picker color in a Nested Forms. Can this option be used? I need some suggestion. Thank you!
Can anyone provide a ‘real-world’ example of how they are using the plugin template? I have a layout I am trying to replicate and while I have gotten information from Support, I need some additional guidence I feel that is outside normal support.
I don’t want just a list of the values and the fields, I want to have a formatted notification sent with some HTML formatting and the values the user entered (based on the values, there will be images and links to PDF documentation based on the selections).
For example a user will select an item from dropdown list for Item A, well the value in Item a is a link to a detailed setup steps PDF for that item, I would like to have the link to the PDF appear instead of the ‘Item A’ text.
Hopefully, someone can offer a template they are using and I can review and adjust to meet my specific needs.
Thanks!
Ken
At random it seems, the style applied is ignored and uses GF default? Any ideas. Attached is the code that is being used.
Any ideas? Thank you!
I can’t think of anything that would cause this to occur randomly. If you can figure out how to recreate it and you’re a Gravity Perks user, we’ll be happy to provide support here:
https://gravitywiz.com/support/
Hello,
I want to change order_summary table to my custom {modified_order_summary}. Could you please tell me how I will do that?
I believe you can use this filter: https://docs.gravityforms.com/gform_order_summary/
Is it possible to send the form (entry) to the same directory as my upload fields? What I’m trying to accomplish is the gather all information in one place. So rather receiving an email with a new entry, I want the entry already included in the directory I’ve created using the ‘rename uploaded files’.
The entry is just data in the database; there is no actual file. Could you clarify what you mean when you say you want it in a directory?
I have an application form for students with two upload fields. My client needs to review the students and wants all the information of the student in its own directory. I managed to rename and save the student picture and a custom pdf. My clients wants also the entry as a PDF in the same directory as the picture and custom PDF.
I’m using the Gravity PDF plugin for now but I’m trying to eliminate the extra step of adding the attached Gravity PDF into the students folder…
Sorry, Richard. We don’t have a solution for generating the entry as a file.
Hi there,
the standard layout of the {all_fields} CSS template is a table, where every field label and entry is a element. So, the output could be very large / long. For example:
field label field value field label field value …
Is there a way to customize it like this:
field label field value field label field value …
Hi Nick, give the sample template a try from this article. I think you will find it is pretty close to what you are seeking.
I’ve tried this several times but there are differences between Outlook and Web. How can I handle this?
Your website has styles that Outlook does not. You will need to provide the same styles you want for Outlook inline. Here’s a good primer on styling for email clients. https://www.campaignmonitor.com/css/
Thanks! Can you do this Outlook styling work for us? Sorry, but I’m not good at coding, so I don’t know how to do this.
Codeable.io is a great resource if you’re looking to get some work done. :)
Hi! I want to hide the “view entry” and “view expanded list” on nested forms. I want to export the entries as pdf but without those links, can you help me?
Hi Camila, we’ll be happy to provide support for GP Nested Forms via the support form.
Hi i am using your plugin to create the review form. I cannot get the fileupload type of field to show on the review. Is it excluded by default? I see Erik van Beek is asking for the opposite. Maybe you implemented his suggestion so now that is the default behaviour? I am building a “catch all” review template so I cannot add the field to the include filter.
any ideas?
thanks in advance
Hi Ignacio, in the context of using {all_fields} in an HTML field (which I am assuming you are doing for your review), you would need to use GP Preview Submission which includes support for file upload fields.
https://gravitywiz.com/documentation/gravity-forms-preview-submission/
hi David, thanks for the quick reply. I am not using an html field, I am trying to output all the fields on the review page using the /gravity-forms/all-fields.php template.
any ideas?
I would use GP Preview Submission instead of the review page, it supports these field types. I’m not aware of any other existing solution.
Hi David and thanks again for the quick reply.
If I buy the GP Perks will I still be able to use my own custom template? I see on the pricing page that the Basic option doesn’t include Snippet support. Is this plugin (ability to use custom templates) considered a snippet or do I need to buy the advanced version?
this is what I am trying to build. (http://garciaoliver.com/Checkout_Summery.png)
My idea is to build a “catch all” system since my client will be creating his own forms and he cannot code specific templates for each.
Also: I’ve tried adding the merge tag to a html field on the last page but all i get is the string {all_fields} output as a string?! Is it because my GF plugin is a bit outdated (Version 2.2.5 ).
Thanks in advance for any help you can provide.
Snippet support specifically refers to whether or not our support team will provide support for issues you encounter with our published snippets; not whether or not the snippets will work with a perk. GP Preview Submission should work just fine with the All Fields Template plugin; however, if you do encounter issues, the All Fields Template plugin is concerned a snippet (basically anything that isn’t an official perk) and you would need an Advanced license to receive support for it.
I recommend getting a Basic license and seeing if it works for you. If you have issues, upgrade to Advanced and we can get you squared away. :)
David, thanks again. I ‘ll be buying the basic version then. Kuddos on the great client support, earned yourself a sale :)
Awesome! Let us know how it works. :)
Hi,
I would like to remove the order and product table. Tried to exclude but didn’t work. How can I do that? Thanks.
Hi Calvin, you’ll need to use a custom template to accomplish this.
Thanks David. Can you guide me which custom template? Appreciate your help. I tried to modify all nested form templates but not working.
Hi Calvin, this snippet provides the ability to create custom templates for the {all_fields} merge tag. Read above for more details. :)
If I wanted to create a conditional where let’s say the sectional field is different than the rest of items, how would I go about doing that?
I’m not sure I follow, Brett? Do you mean when you’re outputting the Section field in your custom template?
Right, say for instance I have three fields: a section, a name, and an email.
Is it possible (what would it look like) to make a custom template that outputs something like the code block here… but in actual code :)
Hi Brett, looks like your code block didn’t make it through but here’s an example of how you can do something different for Section fields in your template:
http://snippi.com/s/0epkr3i
DAVID! That is AWESOME! Seriously, this site and the Perks plugin is by far my 2nd favorite (GF is first) plugin for WordPress. Cheers!
Thanks, Brett! We’re glad we could help!
Hi, this is really nice!
is there a way I can include only required fields? We have a form with a lot of calculation fields and don’t want these to be included, we just want to see the fields entered by the customer. These fields are the only one that are “Required”.
Or can we show only fields with a custom class?
Thank you for your help!
That’s a cool idea and it is possible using the templating system. When loop through the
$items
, you’d need to get the field object and check if it is required, skipping any fields that aren’t required.http://snippi.com/s/9vxrggd
Can you please give an example of custom template with nested form? Not sure how to loop though nested form fields.
Hi GA, hit us up via support and we’ll be happy to provide assistance with Nested Forms templating.
https://gravitywiz.com/support/
Hi David! Excellent work!
Is there an easy way to automatically exclude all fields that are file uploads (both single and multiple)?
In some cases, out of security, I rather not communicate where files are stored on the server. It would be great to be able to automatically exclude file uploads from the all_fields tag.
Makes sense. No solution now but definitely something we could consider for a future release. Filtering by field type.
{all_fields:exclude=fileupload}
It would be great if we could also update the markup for GF Nested Forms in {all_fields}. When I implement the sample template, regular fields are properly given the ul, li styling but the nested form fields still use the table markup.
Hi Emily, we’ll be happy to send you GPNF 1.0-beta-1.20 which supports this. Drop us a line on the support form.
A great plugin! Would be nice to be able to use a modifier to exclude the Order field which is automatically added by Gravity Forms.
Thanks for the feedback. Definitely something we want to add support for but GF doesn’t make it easy to filter this out.
Hi there, is it possible to exclude a section headline only if there is no field to submit within this section?
Awesome plugin and template, thanks David!
it is possible to exclude a specific field as well?
Yes, you can use the {all_fields:exclude[1]} modifier to exclude fields. Replace “1” with your field ID.
Is this used for outputting to a page or outputting in an email?
Hi Jonathan, this is used to replace the output of the {all_fields} merge tag which be can be used almost anywhere. If you want to include it on a page, see GF Post Content Merge Tags.