Create/format new text field(s) based on value of form field

  • 14 October 2023
  • 5 replies

I have a Gravity Form where users can pick and choose between 7 different types of donation options, each of which will ultimately get converted to line items in Bloomerang. I want to remove any donation “type” they do not select from becoming a line item… those with a value of 0. My logic is telling me to test the value and then create a text field that can be used to build the line items. If the donation is greater than 0, the text will be “dollar amount, ”. If equal to zero, the text field is blank (won’t generate line item). FYI: there are other “hard-coded” fields that need to be included as part of the each line item. The content of each varies so the idea of doing a “split text” to remove a line does not work (unless there is an option to look for the “0” and remove the entire contents of the line regardless of the rest of the content?).

I’ve considered many scenarios but none carry all the way through to my end goal. Any help is greatly appreciated!!!

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

Userlevel 7
Badge +14

Hi @MiM-Zap 

Good question.

To help us have true context, please post screenshots with how the data is returned from Gravity Forms.


I’ve attached 3 screen shots, I hope they are what you are looking for. One is of the actual gravity form (GF) and includes a sample “donation” item (personalized gold leaf...). There are 7 of these types of donation items that all work the same. The other two attachments are of my Line Itemizer Zap step where I concatenate the data from the 7 to create the line items. There are 3 components to each donation line item:

  • the “Ornament Info”, includes GF fields and some text labels
  • the “Subtotals”, fields pulled directly from GF
  • the “Appeal Hard Coded”, all custom text

Since I do not know what donation items have been selected, I automatically pull them all into Bloomerang where 7 different payment “splits” are created. I would like to eliminate all splits where the subtotal is 0.

My original idea was to test the value of each subtotal and create text “snippets” to eventually create line items. If subtotal is 0, snippet would be “” (essentially blank). If not 0, something like “125, ”. I would concatenate all these snippets to create my line items.

What do you think? Other options?? Thank you so much!

Userlevel 7
Badge +14


With the way the data is coming thru from Gravity Forms, it would be best to handle this logic with 1 Code step, altho that is an advanced approach.

I’ll do some “learning”. I used to be a programmer way back when so maybe it won’t be so bad?

Userlevel 7
Badge +11

Hi there, @MiM-Zap! 👋

Just wanted to pop by and mention that our Code by Zapier actions have a Generate with AI (beta) feature that you could use to help you generate the necessary code:

As it’s a beta feature, it may not be 100% perfect code but hopefully it will give you enough of a starting point at least. You can learn more about using that feature here: Generate a Code step using AI (Beta)

Hope that helps. Would love to know how you get on with this so please do keep us updated with your progress! 😁