Goal: I want to have a input field that changes its name and value based on what the person wants to enter.
Scenario: I have a form that currently goes like this:
Some Datainput field (irrelevant to question but added for background)
Normally, user enters the value of "Total" into the appropriate field. However, sometimes there is no info of total items, but user has a Sum instead. User can click Sum checkbox, and enter a value into the "total" field, but have it be interpreted as a sum. This feels awkward, but people have learned to accept it and use it this way. Business logic on back end takes care of figuring out whether the user meant total or sum, based on the state of "sum" checkbox.
Based on my business logic and other parameters, the
Total and the
Sum are interchangeable and are mutually exclusive (must enter only one of those but not both).
I am seeking an improvement in UI for that field, because right now I feel it is not intuitive. Do I put both on form and set up UI code to accept one only, do I keep the checkbox, but make field change the name appropriately, or do I do something else?
My goal is to make a UI that will be intuitive to new users and old users will not have to re-learn too much.
EDIT: sample wireframe: