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.

get price from database based on qty and product selected

  1. Hi
    I have created a 'quick quote form' for payroll services. the form is like this

    Number of employees (this is the qty field) - user enters 10
    select service - 2 product options, weekly payroll or monthly payroll - user selects weekly payroll
    Now instead of using the total field I have used a custom field. I want to dynamically populate this field by looking up the qty field from a wp table based on what product the user selects then enter the price in the custom field.
    so this field would lookup 10 from the wp table wprice and return that price.

    Is this possible and how would i do it?

    Can anyone help me

    thanks
    Jodie

    Posted 12 years ago on Tuesday December 27, 2011 | Permalink
  2. Virtually anything is possible with Gravity Forms using available hooks/filters and custom jQuery. That sounds like marketing spin but it's not. Developers with WordPress, PHP and jQuery development knowledge who know how to use hooks and filters in WordPress to use can customize Gravity Forms to do virtually anything they want.

    The issue is there isn't a simply way to let you know how you would do this. It would require taking a deeper look at what you want to accomplish, where the data is, and then looking at what the best implementation would be. Then custom PHP and from the sounds of it some custom jQuery would need to be written to accomplish this.

    We don't have any readily available code examples that do what you described so there isn't existing code snippets I can point you to for assistance.

    How proficient are you with WordPress development, PHP, jQuery and the use of hooks/filters when customizing WordPress and themes/plugins?

    Posted 12 years ago on Wednesday December 28, 2011 | Permalink
  3. Doesnt sound as simple as I had hoped. I am not bad with wordpress and php, hooks/filters picked up a bit, jQuery know nothing about. I have customized my own wordpress website theme.

    I am a pretty quick learner and with a bit of guidance I'm sure I could do it.

    Posted 12 years ago on Wednesday December 28, 2011 | Permalink