• i need to create a gravity form for submitting a custom post type.
    one of the custom fields input should be calculated from other fields values.
    so i selected the field type to be “number”, enabled calculation, and added a valid formula. problems are:
    1. field value is not dynamically updated when i input values into the formula source fields, and calculated data is not saved.
    (strangly it works ok if i add another – not custom field – number field with calculation enabled)
    2. field is not read only so the claculatino can be overriden by user.

    i would realy appreciate you response.

    best regards,
    Yair

    https://ww.wp.xz.cn/plugins/gravity-forms-custom-post-types/

Viewing 1 replies (of 1 total)
  • Hi

    Late to the party, but I’ll answer in case anyone else comes across this.

    In my case, custom post fields just wouldn’t calculate. I presume this is a bug with Gravity Forms.

    Anyway, I found a way around it. First, set up your custom post field with the calculation in. This won’t work. However, you then need to make an additional plain old number field (not linked to a custom field) with the same formula in, and use the same field label as you use for your custom field

    Somehow it makes them both work. Just hide the one you don’t want visible by making them available to admin only (under the advanced tab in the field settings.)

    EDIT: You can hide your custom post field, but if you hide the plain number field, the value doesn’t get passed to your custom post.

Viewing 1 replies (of 1 total)

The topic ‘calculated caustom field’ is closed to new replies.