angularjs radio box and input text

215 views
Skip to first unread message

zied boufaden

unread,
May 19, 2014, 12:09:15 PM5/19/14
to ang...@googlegroups.com
hi, can we set dynamic value to a radio box using an input text while keeping the state of the radio box to checked . for example : 

<div class="two fields">
    <div class="field width_80">
        <label data-ng-bind="lang.languageName"></label>

        <div class="ui labeled icon left input">
            <input type="text" dynamic-input-name="lang.languageName" data-ng-model="lang.name" data-ng-required="true" data-ng-minlength="3" />
        </div>
    </div>
    <div class="field width_10">
        <label></label>

        <div class="ui labeled input">
            <input class="admin-radio-box" type="radio" name="group" data-ng-model="name" value="{{lang.name}}" />
            <label class="admin-radio-box-label">is Default</label>
        </div>
    </div>
</div>




Sander Elias

unread,
May 20, 2014, 2:24:53 AM5/20/14
to ang...@googlegroups.com
Hi Zied,

If you have questions like this, it's way easier if you post them in a plunk ;)
Here you go: Plunker
Play arround with it a bit, it might work a bit different then what you imagined.
the missing part was the ng-value, in stead of the value attribute.

Is this what you was going for?

Regards
Sander

zied boufaden

unread,
May 20, 2014, 3:47:10 PM5/20/14
to ang...@googlegroups.com
Hi Sander, 

i am sorry for the late :). so this is my case radio box plunker. my problem that i want to sepearte the checked state of the radio box and the value of the input filed. what i wonder is for every input text the default checkbox stat will remain the same instead of being equal to the default name.

Regards
Zied

Sander Elias

unread,
May 21, 2014, 2:51:10 AM5/21/14
to ang...@googlegroups.com
Hi Zied,

Your sample just shows what radio buttons do. I have a hard time understanding what it is you are trying to accomplish?
is it something like this: http://plnkr.co/edit/Bo2u7F?p=preview

Regards
Sander
Reply all
Reply to author
Forward
0 new messages