PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Setting one fields input based on another fields value

  1. Hi there,

    I was wondering if it is possible to base one fields value on information entered into another field on the same form? If this isn't possible using the Gravity Forms interface I would appreciate it if you could point me in the right direction to create this kind of functionality using jQuery/Javascript instead.

    Cheers!
    - Michael

    Posted 11 years ago on Tuesday December 4, 2012 | Permalink
  2. Hi Chris,

    Thanks for your reply, to clarify I am not trying to copy the value of one field to another, but simply determine a value of one field depending on another automatically, e.g.

    If, Field A = "X",
    then, Field B = "Y"

    Posted 11 years ago on Tuesday December 4, 2012 | Permalink
  3. The idea will be the same. You have to watch for the change in value of the first field, then set the value of the second field. You don't have to copy the value from the first field: that just happens to be what they were doing in that example.

    If your first field input choices are limited, you could do this with conditional logic as well. But if the first field can take any sort of input, then it might be more difficult to use conditional logic to show the value in field 2.

    Posted 11 years ago on Thursday December 6, 2012 | Permalink