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.

"Pricing Field" of type "Product" doesn't validate

  1. I have a "Pricing Field" of type "Product" which used to work. After I updated to GF v1.5.2.8 the form won't validate and gives this field the following error message: "Please enter a valid value".

    The site's locale is Norwegian Bokmål (nb_NO)

    I have the following settings:

    • Field Type: Single Product
    • Price: Kr 0,00 (gets filled in dynamically)
    • Disable quantity field: unchecked
    • Required: checked (tried to uncheck, but still doesn't validate)
    • No Duplicates: unchecked

    Advanced tab:

    • Allow field to be populated dynamically: checked
    • Name: productName
    • Price: productPrice
    • Quantity: productQty

    Enable conditional logic: unchecked

    These are my filters to populate the fields:

    add_filter("gform_field_value_productName", "gnd_gf_populate_postTitle");
    function gnd_gf_populate_postTitle($value){
    	global $post;
    	return get_the_title();
    }
    
    add_filter("gform_field_value_productPrice", "gnd_gf_populate_productPrice");
    function gnd_gf_populate_productPrice($value){
    	global $post;
    	return intval(get_post_meta(get_the_ID(), '_gnd_publication_price', true));
    }
    
    add_filter("gform_field_value_productQty", "gnd_gf_populate_productQty");
    function gnd_gf_populate_productQty($value){
    	return 1;
    }
    Posted 13 years ago on Monday June 27, 2011 | Permalink
  2. Is the price visible in the pricing field? Is your code dynamically populating it? If so you should be able to see it reflected in the form. Can you post a link to the page containing the form so we can see it happening?

    Posted 13 years ago on Monday June 27, 2011 | Permalink

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