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.

User defined price with minimum and maximum amount

  1. Hi,
    We want user defined price with min and max amount that could be limited.
    This was discussed in one of the forums:
    http://www.gravityhelp.com/forums/topic/no-required-rule-for-product-field#post-20757

    Could this be implemented in the next version?

    Thanks,

    Posted 12 years ago on Monday October 15, 2012 | Permalink
  2. We'll move this to feature requests for now. Thank you for the reminder.

    Posted 12 years ago on Monday October 15, 2012 | Permalink
  3. We hope this will be done soon since the earlier request was 18 months back and it hasn't been done yet.

    Posted 12 years ago on Monday October 15, 2012 | Permalink
  4. David Peralty

    We no longer speculate on when features will be added. It is based on user need, developer resources, and WordPress updates/focuses.

    Posted 12 years ago on Monday October 15, 2012 | Permalink
  5. I came to the support forum looking for exactly this feature. I vote for it. :-)

    We have an HOA that allows PayPal payments and each person might owe a different amount -- but we don't want them setting up $1 per year over 12 months... So we want to encourage $25 or greater amounts. Plus, factoring in Micropayment settings.

    Thank you.

    Posted 12 years ago on Tuesday October 30, 2012 | Permalink
  6. It seems like this would have been added already. I need a minimum price field b/c I would like the user to submit the value of, for instance, a gift card, but I don't want anyone buying one for less than $20.

    I am open to suggestions of other ways to do this.

    Posted 11 years ago on Wednesday December 12, 2012 | Permalink
  7. David Peralty

    obxm - You could use gform_field_validation and check if the number is less than $20, then return an error. http://www.gravityhelp.com/documentation/page/Gform_field_validation

    Posted 11 years ago on Wednesday December 12, 2012 | Permalink
  8. Thanks! Brilliant.
    So, what value/variable is the price listed as from the product pricing field? When using the function as its written doesn't work. I think i'm on the right track, so it should be $price or $number instead of $value ?

    Posted 11 years ago on Wednesday December 12, 2012 | Permalink
  9. Sorry, maybe I can rephrase this question to be easier to answer....
    Since the user-defined price number entered into the form is reformatted to $xx.xx then how do I validate that?

    When I use the function with a < 25 as the if statement, it won't pass any values entered even if they are 25 and greater.

    add_filter("gform_field_validation_5_1", "custom_validation", 10, 4);
    function custom_validation($result, $value, $form, $field){
    
        if($result["is_valid"] && intval($value) < 25){
            $result["is_valid"] = false;
            $result["message"] = "Please enter an amount of $25 or more.";
        }
        return $result;
    }
    Posted 11 years ago on Wednesday December 12, 2012 | Permalink
  10. @obxm, please open a regular support forum topic. You piggybacked onto a feature request but need additional support at this point.

    http://www.gravityhelp.com/forums/forum/gravity-forms#postform

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

This topic has been resolved and has been closed to new replies.