0
我正在嘗試將附加的event_type提交給從單選按鈕中選擇的選項。例如,如果「專業」是選擇的選項,我想將event_type設置爲提交的數據。還將「活動」類設置爲當前選定的標籤。我想弄清楚如何做到這一點。任何幫助?由於使用ReactJs提交廣播輸入並將活動類別設置爲當前選擇
<label htmlFor="professional" className="EventTypeFieldButton EventTypeFieldProfessional active">
<span className="TypeDot"></span>Professional
</label>
<input type="radio" name="event_type" id="professional" value="professional" />
<label htmlFor="academic" className="EventTypeFieldButton EventTypeFieldAcademic">
<span className="TypeDot"></span>Academic
</label>
<input type="radio" name="event_type" id="academic" value="academic" />
<label htmlFor="miscellaneous" className="EventTypeFieldButton EventTypeFieldMiscellaneous">
<span className="TypeDot"></span>Miscellaneous
</label>
<input type="radio" name="event_type" id="miscellaneous" value="miscellaneous" />