databind icon indicating copy to clipboard operation
databind copied to clipboard

Radio buttons

Open lrkwz opened this issue 11 years ago • 4 comments

What if I have two (or more) exclusive "radio" buttons?

Your sample has only a single (useless I'm afraid) radiobutton which is always "on", what happens if I have more buttons with the same name (in order to make them mutually exclusive).

Using jquery you should write something like $('input[name="XYZ"]:checked').val() in order to get the value of the checked one.

lrkwz avatar Dec 04 '14 16:12 lrkwz

Thats an excellent question... I'm leaning towards the AngularJS solution (https://docs.angularjs.org/api/ng/input/input%5Bradio%5D) as it seems more intuitive to me... WDYT?

grnadav avatar Dec 06 '14 14:12 grnadav

Angular seems quite over engineered for a simple form binding in my opinion. May be the redio implementation alone is simple enought to use.

lrkwz avatar Dec 17 '14 14:12 lrkwz

Is there a way to use radio buttons yet?

PoeHaH avatar Sep 07 '17 05:09 PoeHaH

Hey Maarten,

This library is no longer maintained. Feel free to fork it to add such support.

On Thu, Sep 7, 2017 at 8:24 AM, Maarten Belmans [email protected] wrote:

Is there a way to use radio buttons yet?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/grnadav/databind/issues/10#issuecomment-327689867, or mute the thread https://github.com/notifications/unsubscribe-auth/AAiolm8i39pQXylnVLULdvlT51eBo43Jks5sf34WgaJpZM4DEV3y .

-- Codesmith

grnadav avatar Sep 10 '17 12:09 grnadav