How do I use radio buttons in React?

前端 未结 4 1864
别那么骄傲
别那么骄傲 2021-02-13 22:36

I\'m making a form, and I was in need of a radio input. How do I get the checked radio input in a onSubmit-function, what is the correct way?

This is my code, I myRadioI

4条回答
  •  独厮守ぢ
    2021-02-13 23:03

        { items.map(item => 
        {item.qno}
        )}
    
        { items.map(item => 
        {item.question}

    { item.options.map(option => {option.option1} )}

    { item.options.map(option => {option.option2} )}

    { item.options.map(option => {option.option3} )}

    { item.options.map(option => {option.option4} )}

    You can use Radio button's like this also

提交回复
热议问题