0

How can I have where the 'other' turns into a button where the user can input as much money as they want? I tried creating a const other with a button and putting {other} in the options tab like this options={['$5', '$10', '$20', '$50', '$100', {other}]} but that did not work. I am Using Grommet UI, Any suggestions are appreciated. Thank You.

           <RadioButtonGroup direction="row" required
           gap="xlarge"
           id="example2-id"
           name="example2"
           options={['$5', '$10', '$20', '$50', '$100', 'other']}
           />
Ken White
  • 123,280
  • 14
  • 225
  • 444
7k.luca
  • 17
  • 5
  • I've removed your second question. If you have two questions on different topics, create a new separate question for each of them using the *Ask Question* button. This is a *question and answer* site - note that question is singular, not plural. If you post two separate questions in one post, it will end up being closed as "Needs more focus". – Ken White Apr 28 '21 at 23:16

1 Answers1

1

Radiobuttons return a preset value, if you want to allow the user to input a custom value I suggest adding a TextInput under your Radiobutton and wrap it in a form.

Ole Nor
  • 135
  • 8