Display Alert or Warning if Choice is selected

Is it possible to have a note/alert/message appear if a choice is selected?
For example, if the user selects that their favorite ice cream is chocolate a note would appear with text “contains dairy” ?

tl;dr - see a demo here

You could do that with conditional logic. You could add an HTML field with the warning, styled however you like, and have that SHOW when their selection is something that has dairy (in this example.)

Otherwise, if you don’t want to use conditional logic and an inline HTML field, you could use JavaScript to pop up an alert when a selection is made which has dairy in it.

The code looks something like this (for my form and field IDs):

  jQuery(document).ready(function($) {
    $('.gfield_radio input#choice_279_1_1').change(function () {
      alert("Notice: this dessert contains dairy");

I put up a quick demo showing both methods here.

You can download a copy of the form in json format to import into your own site, so you can see how it was built. If you have any questions, please post them here.

© 2008 - 2019. Gravity Forms is a project by Rocketgenius Inc.