Hi @rhubeny76
I hope you’re well today!
It’s not possible to change number filed value based on the radio field value but you can use multiple number fields together with calculation field. Sticking to your example (two predefined amounts + ability to override it):
1. Put a radio field with two options like “I want to donate $10” and “I want to donate $35” on the form. Set one of the options as default.
You do not need to enable calculation for that field but you should add description, similar to “choose donation amount or enter your own in the amount field”. That would look similar to this on the form:
https://app.screencast.com/OLv4llRwOchp0
2. Now put two number fields on the form
a) in first field
– set “Default Value” to 10
– in ‘Settings” section set your minimum/maximum limits
– in “Calculations” section set calculations to “Enabled” and set the “When this field is hidden…” option to “Null (zero)”
– in “Visibility” section set “Show this field if All of the following rules match” with the rule based on your radio field; basically, you want to show this field if option “I want to donate $10” is selected in radio button.
b) in second field
– set “Default Value” to 35
– in ‘Settings” section set your minimum/maximum limits
– in “Calculations” section set calculations to “Enabled” and set the “When this field is hidden…” option to “Null (zero)”
– in “Visibility” section set “Show this field if All of the following rules match” with the rule based on your radio field; basically, you want to show this field if option “I want to donate $35” is selected in radio button.
At this point user will be able to select predefined donation and, regardless of which one they choose, they’ll still be able to simply enter amount into the number field.
3. Then set your calculation field as follows:
– in “Settings” section check the checkbox for “Hidden” under “Field Type”
– in “Calculations” section set calculation formula to be a sum of both number fields (like {number-1}+{number-2} or similar, depending on your number fields IDs).
– do NOT set any visibility rules in “Visibility” section
Now in your payment field use that calculation field as amount source and that’s it. When user selects one of the radio button options it will update calculation value (invisible to the user) accordingly and so it will if they change number manually. Since one of the number fields will be always hidden by visibility rules and due to that it will be set to zero, ultimately calculation value will always be equal to the current value of the one visible number field.
I created such an example form for you so you could see exactly how to set it up. You can copy export code form here
and import it to some test site to check it.
Note: I’ve additionally added a HTML field to that form to show current value of hidden calculation field but it’s not needed on the actual form;
Best regards,
Adam
