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.

Dynamic Calculations

  1. rcDev

    Hi, I am trying to do a calculation using other fields as parameters.

    I need FLOOR. So I can't use the simple BEDMAS formulas allowed in GF.

    I found several references to using hooks and JS to accomplish this, like this one:

    However, I am coming up short on solving the problem. Currently, I am using a *Product Field* and the gform_field_value_{parameter_name} hook. I can change the price to something static but can't seem to access any other fields using rgpost or rgget.

    I can use rggpost during gform_pre_render to get these values but not in gform_field_value_{parameter_name}. Are we not meant to be able to obtain form information from this hook?

    That seems weird.

    I looked in forms_model.php and in the function get_parameter_value, they are using rgget to obtain the value to be filtered. And in the function that calls that, get_input_value, they are using rgpost to obtain values by the standard form input_{field_ID}

    So it works before the filter gets called but not during?

    Posted 7 years ago on Monday March 11, 2013 | Permalink
  2. Mark, I saw that you created a priority support ticket (18096) and you are already in communication with support there. I'll close this ticket.

    Posted 7 years ago on Wednesday March 13, 2013 | Permalink

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