Hello! Here is something you can try. This is going to depend on some setup from you. If you have a document you can share I would be happy to help... otherwise see what you can do with this.... it should get you close. I tried to put in comments to help you with what the setup should be as well as what the script was doing. Place this script on a Submit button for the user to click when they have completed the form.
// Name your radio button for regular regularRate
var regularSelected = this.getField("regularRate").value;
// Name your radio button for relocation relocationRate
var relocationSelected = this.getField("relocationRate").value;
// Name the field the user puts the miles traveled milesTraveled
var milesTraveled = this.getField("milesTraveled").value;
// The dollar amount of reimbursment for regular...
var regularReimbursement = 1.25;
// The dollar amount of reimbursment for relocation...
var relocationReimbursement = 2.50;
// If the regular radio is selected...
if (regularSelected == "regularRate"){
payoutTotal = milesTraveled * regularReimbursement;
// Name a text box payoutTotal the math equation will populate in that field
this.getField("payoutTotal").value = payoutTotal;
}
// If the relocation radio is selected...
if (relocationSelected == "relocationRate"){
payoutTotal = milesTraveled * relocationReimbursement;
// Name a text box payoutTotal the math equation will populate in that field
this.getField("payoutTotal").value = payoutTotal;
}