Bulk add for Conditional logic


I’m trying to add a lot of numbers to a conditional logic field so when someone enters the specific number I can have another field show. Is there a way to bulk add the numbers so I don’t have to enter each in one at a time?

If there is a something out there either an addon or even some code I could take a look at I would greatly appreciate it, it would save me a lot of time now and in the future when the list needs to be updated. Thanks.

Can you explain what the numbers are? Are they sequential, where you would have ranges, or are they random? Once a number is entered, can it be used again later? There’s no bulk add, so we’ll need more about what these numbers are and how they’re used to give you the best approach to this. Thank you.

They are not sequential, they are 11 digit numbers that have an increasing range but they don’t always follow the next number. I want to record what ever number they enter into the field but I want a conditional logic box appear if they enter in one of the numbers I designate. It works its just the tedious task of adding a hundred conditional logic fields.

It would be like if these are the serial numbers for a product and I’m only trying to recognize the ones that bought the deluxe version of the product. The product has sequential product numbers but I’m only wanting to grab specific ones out to use for the field.

It would be nice if I could have a csv file or something I could load with the values, but I’m not sure what my options are.

Number Examples:

Reading through the “Get Help” I ran across these posts Conditional logic with a data set

The ability to upload a .txt file to compare a field to a list of numbers would be great.

One the questions I have would that work with conditional logic instead of form validation? So if they enter 06002402000 a field opens up saying “deluxe version”. I’m trying to find a solution that works with having a very large set of numbers.

The second question is if that would work we might end up having more fields like “Standard version” and “Ultimate version” based on different numbers. could I do the same thing with multiple .txt files? It would be nice to be able to just update a .txt file with the new number set.


Any thoughts, Ideas or direction would be appreciated. Thank you.

Hey Pippin,

You could perhaps look at Conditional Pricing by Gravity Wiz. It works with a product field, but with some clever footwork you could possibly make it do what you’re after. I mention it because they have the facility to add the conditional logic via CSV. It requires a Gravity Wiz subscription but well worth it in the long run.

What is it that you need to do with the value once it is submitted and validated, that requires conditional logic?

The old forum topic you found about validating a number against a list works with validation, but not with conditional logic, so that is not a good fit if you need to use conditional logic.

I just need a field to show if they enter a specific number. The 11 digit number they enter is identifying the product and the conditional logic field shows them and us the properties of the product they are making the submission about. The image below is basically what I’m trying to do except for having to enter each number one by one. All the conditional logic would be the same formula except for the number.

I can’t see your conditional logic rules in the screenshot, but I assume it’s just a rule that if ANY match, you show one field? Or multiple fields?

In the radio button fields I can see, the looks like the radio button is prechecked for them; is that correct? So, once a value is looked up and there is a match, you just add some pre-determined values to the submission - ones they cannot change? Or is there more to it?

The conditional logic is the same for every one except the number, SHOW this field if ANY of the following match: PRODUCT SERIAL NUMBER, IS, 111111111111. Yes its just pre-determined values that they can not change show when the number is entered.

Yup! :wink:

Add filter to functions.php:

add_filter( “gpcp_enable_importer”, “__return_true” );

This will add an import button (screenshot) to the GF Conditional Pricing page.

The rest of the process is fairly straightforward and there is a sample file that is available to download before importing.

1 Like

Do you think Conditional Pricing could be used to for conditional numbers and not a monetary value? So instead of $1,004,392.00 have 1004392? If so that might work if I can have it display other fields and not just a price adjustment based on how many products they order.

Hey Pippin, my apologies for the VERY late reply… you’ve probably resolved the issue by now.

If not - yes, you can certainly do it. You have to use a product field for the result, but if you’re a Gravity Wiz member you can make it a hidden field and then use their Copy Cat perk to copy the result to a normal text field without number formatting.


Hi Phil,

I haven’t unfortunately not resolved this yet. I was trying to use the Gravity Forms Chained Selects Add-On because of the .csv upload capabilities but didn’t get very far because the other fields you had to select them even though they corresponded to the first column.

I also tried Codeable but wasn’t able to get any help. So I just picked up Gravity Wiz and was wondering how I might use the conditional pricing to resolve this issue. Thanks.

Hi Pippin,

I’ve replied to your DM.



Just following up on this thread, did anyone come up with a solution? I’m in need of the same functionality. Bulk add a specific list of zip codes (100s of them) to show/hide fields off of. Also it would be great to add this capability to all areas where conditional logic could apply, i.e. Webhooks, Confirmations, etc.

Does the add_filter( “gpcp_enable_importer”, “__return_true” ); function still work , I added it to functions.php and I am not seeing what your screenshot is showing. Thanks in advance

Hi Walter, to be honest I don’t know. The project I used it on no longer exists and I haven’t needed the functionality since.

Perhaps @david from Gravity Wiz could let us know?

Yes, it still works. Did you add it to your theme’s functions.php? If so, go ahead and drop us a line via support and we’ll be happy to get you sorted out. :slightly_smiling_face:


1 Like