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.

Changing Price / Quantity Label content with gform_pre_render

  1. Tom

    Hey all, have been attempting to update the Labels on a form front end using the gform_pre_render hook. However just noticed that these values are hard coded in the plugin within common.php.

    To workaround I've modified these static references in common,php to be :

    $field['inputs'][2]['label'] for Quantity
    $field['inputs'][1]['label'] for Price.

    Obviously this isn't a great work around and will be replaced as soon as the next update is applied, so wondering if anyone knows the correct way to achieve this same result?

    Posted 10 years ago on Thursday August 11, 2011 | Permalink
  2. Tom,
    This is actually a limitation we currently have. Those strings can't be changed unless you use the translation files. Some of the other fields with similar sub-labels (name, address, etc) offer a hook that can be used to change them, but the product field does not. I will be looking at improving this for our next release. Meanwhile, your solution is as good as any.

    Posted 10 years ago on Thursday August 11, 2011 | Permalink