मेरे पास चेकबॉक्स की निम्नलिखित सूची है। जिस तरह से सूची आउटपुट होती है, यह उपयोगकर्ता को एक से अधिक मान चुनने की अनुमति देती है। हालांकि, मुझे उपयोगकर्ता को केवल नीचे दिए गए चेकबॉक्स की सूची से एक एकल मान चुनने की आवश्यकता है।रेडियो बटन या एकल चयन के साथ चेकबॉक्स में चेकबॉक्स (एकाधिक चयन) को बदलें?
क्या यह किसी भी तरह से jQuery के साथ प्राप्त करना संभव है? सूची को रेडियो बटन में बदलने, सूची या कुछ और मदद करने के लिए भी ठीक है।
दुर्भाग्यवश मेरे पास जेनरेटिंग फ़ंक्शन तक कोई पहुंच नहीं है, इसलिए मैं आउटपुट नहीं बदल सकता।
अग्रिम
<form class="ajax-form" id="user-register" method="post" accept-charset="UTF-8" action="(...)">
(...)
<div id="edit-notifications-custom-custom-berlin-wrapper" class="form-item form-option">
<label for="edit-notifications-custom-custom-berlin" class="option"><input type="checkbox" class="form-checkbox" value="1" id="edit-notifications-custom-custom-berlin" name="notifications_custom[custom_berlin]"> Berlin</label>
</div>
<div id="edit-notifications-custom-custom-hamburg-wrapper" class="form-item form-option">
<label for="edit-notifications-custom-custom-hamburg" class="option"><input type="checkbox" class="form-checkbox" value="1" id="edit-notifications-custom-custom-hamburg" name="notifications_custom[custom_hamburg]"> Hamburg</label>
</div>
<div id="edit-notifications-custom-custom-frankfurt-am-main-wrapper" class="form-item form-option">
<label for="edit-notifications-custom-custom-frankfurt-am-main" class="option"><input type="checkbox" class="form-checkbox" value="1" id="edit-notifications-custom-custom-frankfurt-am-main" name="notifications_custom[custom_frankfurt-am-main]"> Frankfurt am Main</label>
</div>
<div id="edit-notifications-custom-custom-duesseldorf-wrapper" class="form-item form-option">
<label for="edit-notifications-custom-custom-duesseldorf" class="option"><input type="checkbox" class="form-checkbox" value="1" id="edit-notifications-custom-custom-duesseldorf" name="notifications_custom[custom_duesseldorf]"> Düsseldorf</label>
</div>
<div id="edit-notifications-custom-custom-bielefeld-wrapper" class="form-item form-option">
<label for="edit-notifications-custom-custom-bielefeld" class="option"><input type="checkbox" class="form-checkbox" value="1" id="edit-notifications-custom-custom-bielefeld" name="notifications_custom[custom_bielefeld]"> Bielefeld</label>
</div>
<div id="edit-notifications-custom-custom-muenchen-wrapper" class="form-item form-option">
<label for="edit-notifications-custom-custom-muenchen" class="option"><input type="checkbox" class="form-checkbox" value="1" id="edit-notifications-custom-custom-muenchen" name="notifications_custom[custom_muenchen]"> München</label>
</div>
(...)
asdasd
बदल आप करने में सक्षम हैं, रेडियो बटन जाने का रास्ता है। एचटीएमएल में मूल रूप से उपलब्ध कुछ हासिल करने के लिए जटिल क्लाइंट-साइड कोड जोड़ने की कोई आवश्यकता नहीं है। – dotariel
मैं सहमत हूं, लेकिन जैसा कि मैंने कहा है कि मैं इसे आउटपुट से पहले नहीं बदल सकता। – maze