I would like to calculate the sponsorship from different dropdown in the calculation field

I am trying to design a form for sponsorship where I have multiple sponsorship levels and sub dropdowns and looking for a way for calculation field to set it up. Please check the form export here https://gofile.io/?c=FuqDB1

Currently, this is the formula I am trying https://imgur.com/8lG2pQ8

  • Nithin
    • Support Wizard

    Hi Paul,

    I’m afraid, at the moment there isn’t any out of the box regarding this in the form. I’m checking with the developer to see whether there is any workaround that could be applied regarding this.

    Will keep you posted once I get further feedback asap. Have a nice day ahead.

    Regards,

    Nithin

  • Nithin
    • Support Wizard

    Hi Paul,

    Seems like an easy workaround could be achieved, by creating multiple Calculation fields instead of only One Calculation field, and each calculation field pointing to the Select field, and with a visibility condition as follows:

    This seems to work as required. Could you please check, and see how it goes. I have also attached an export for the form with the above example, please give a look, and see whether it helps. Have a nice day ahead.

    Best Regards,

    Nithin

  • Paul
    • WPMU DEV Initiate

    In the end, there needs to be a grand total. I think your solution will result in the wrong total still. The issue is there is no ability to create a default value for select fields, other than to manually create a selection with the desired amount, in this case zero.

    Hiding the fields doesn’t work. The value is still there.

  • Nithin
    • Support Wizard

    Hi Paul,

    In the end, there needs to be a grand total. I think your solution will result in the wrong total still.

    Grand total could be another "Calculation" field, not sure what's the formula for the grand total, so that we could check further regarding that aspect.

    Just to be sure did you test the attached zip form and see whether it worked to your needs? Because unless I'm not missing something, when tested it seems to calculate the select fields based on the logic you have mentioned before.

    That's the total when Selecting "Sapphire Sponsor 50-10", and selecting "Sapphire $100" would be 100, as shown in the screenshot:

    The issue is there is no ability to create a default value for select fields, other than to manually create a selection with the desired amount, in this case zero.

    Hiding the fields doesn't work. The value is still there.

    I'm afraid, I'm not sure whether I fully understood the above query. You meant by default the value for the calculation should be 0? If yes, doesn't create an empty option in the select field help?

    Please do check, and let us know if the attached form helps or not. So that we could check for any workarounds are possible or not.

    Regards,

    Nithin

  • Paul
    • WPMU DEV Initiate

    For the solution you’ve mapped out, how are these multiple calculation fields tied to the stripe field? Is the stripe field hidden unless certain conditions are met? Can you have multiple stripe fields in a form? If we can have multiple stripe fields, conditionally activated, then I agree this will work.

    In reference to you question about default field values, the selection field defaults to the first selection option. Your number field for example, has an optional “default value”. For reference, here is what your competitor gravity forms says about default values for “dropdown” fields: https://docs.gravityforms.com/drop-down/#default-value

  • Nithin
    • Support Wizard

    Hi Paul,

    Since the initial form you shared didn’t have Stripe, thought it was only meant for calculations. I’m afraid, with Stripe field this won’t be a feasible solution.

    Our team is looking forward to improving how conditions could be handled in the Calculation fields down the road, so such workflows could be performed out of the box. At the moment, I’m afraid it isn’t possible to achieve the exact workflow you are looking at the moment.

    Your number field for example, has an optional “default value”. For reference, here is what your competitor gravity forms says about default values for “dropdown” fields: https://docs.gravityforms.com/drop-down/#default-value

    In general, the default value for the select field would be the options marked as “selected” as shown in the following example:

    Other than that, I’m afraid there isn’t any way to add custom value out of the box. Since it’s a 3rd party plugin, it’s not clear how does the default value in terms of Dropdown works in Gravity forms. However, I’ll make sure to bring this into our developer’s attention for any further improvements regarding this down the roadmap.

    Kind Regards,

    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.