Own shortcode based on form data [RESOLVED]

Hi,

In my project I have to display about 30 different notifications after submitting the form. I would like to avoid defining 30 different notifications :slight_smile:

The confirmation ( i only can use text confirmation ) are actually different pictures placed in divs. The pictures depend on the fields filled in by the user when submitting the form.

For example: If entry1 has an apple entry I would like to use a specific php code where I embed apple_pic.jpg. If entry1 will have car. Similarly, I embed car_small.jpg

Can it be done somehow? By creating a shortcode in php which will capture the data from entry1 and display the code depending on the content?

Do you mean 30 different on screen confirmations, or do you mean 30 email notifications?

It sounds like you mean confirmations. I think you can use one confirmation, and the conditional shortcode. It’s documented here:

That would allow you to say “If apple was selected in field 30, then show this content” which could be your embedded apple image. Does that work for you? No PHP is required to use this solution.

Well, yes;) Every time I am surprised how many built-in options GF has. Unfortunately, I missed this functionality and it is impressive, Thanks for the guidance.