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.

populate field(s) after gform_validation

  1. ken@kennethmschwartz.com
    Member

    In my gform_validation I call a web service to validate form inputs. I'd like to populate form data (e.g. price) with a value returned from the web service. Is this possible?

    Posted 7 years ago on Sunday February 17, 2013 | Permalink
  2. Can you share an example of how you are using gform_validation right now? Please post your code at pastebin.com or pastie.org. The $form object is available at the time of gform_validation, but I'm not sure if you can change the value of a form field at that point. If you post your code and possibly share a link to your form online, maybe we can come up with a solution.

    Posted 7 years ago on Monday February 18, 2013 | Permalink
  3. ken@kennethmschwartz.com
    Member

    I think I might not have phrased my question correctly. I have a form that needs to interact with a back end system. I'd like to be able to display information (e.g. price) returned from the back end system. The only place this seems to make sense is in gform_validation, b/c I don't want to call the back end service with 'invalid' data. My thought process was to allow Gravity Forms to validate the data, then I would call my web service which would do additional validation and if that passes return some data (e.g. price). I would then like to be able to display that information in the Gravity Form so the user can see it before they 'confirm' the purchase.

    Posted 7 years ago on Monday February 18, 2013 | Permalink