• Resolved jejonesjnr

    (@jejonesjnr)


    I have a form with 9 single upload options. I want to calculate a payment based on the number of uploads. Each upload is restricted to one entry.
    I have a calculation field but it relies on the person selcting the number of uploads they have done in order to calculate payment.

    Is there any way to calculate what I’m looking for?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @jejonesjnr

    I hope you are doing well.

    Sorry for the delay here.

    You would need to use the number field, for example, let your customer choose how many upload fields it is supposed to show, then in the calculation, you could use this number field.

    To prevent for example customer adding 1 and uploading 9 you can use the visibility rules to hide the fields and show based on the number.

    https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#Forminator-Conditional-Logic

    Best Regards
    Patrick Freitas

    Thread Starter jejonesjnr

    (@jejonesjnr)

    Thanks for the response.
    Are you suggesting that the conditional logic on the upload field should be something like.

    For one upload field (logic is >0 but <2)?
    and for 2 fields (>1 but <3)?

    If this is the case, what happens if the person selects 9 fields, upload 9 files and then changes the number of uploads to 1 to recalculate the stripe payment.
    Does it remove all the the uploads already sunmitted?

    Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @jejonesjnr

    I checked on my lab site and in such a scenario, those data are erased.

    My example:
    1. one number field
    2. one calculation field with the calculation: “{number-1}”
    3. upload field #1 with visibility as number is great than 0
    4. upload field #2 with visibility as number is great than 1
    4. upload field #3 with visibility as number is great than 2

    If I type 3 I get 3 upload fields, I attach 3 files, I change the number to 1 and again o 3, and upload fields #2 & #3 are empty again.

    Kind Regards,
    Kris

    Thread Starter jejonesjnr

    (@jejonesjnr)

    Excellent. Thank you for testing this out for me.

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @jejonesjnr ,

    We haven’t heard from you for a while now, so it looks like you don’t have more questions for us.

    Feel free to re-open this ticket if needed.

    Kind regards
    Kasia

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Count number of uploads’ is closed to new replies.