Angular radio buttons and custom input

RyanHirsch

I am trying to set up a form, with some radio buttons and a textarea for custom input. If I select custom input, and start typing it loses the radio selection and I must select the custom input again when I am done typing

http://jsbin.com/AMAniXu/2/edit

How can I ensure that selecting the radio next to the textarea and providing custom input maintains user selection?

zs2020

Use a different model object other than the object used in the ng-value of the checkbox

<input type="radio" data-ng-model="selectedEntry" data-ng-value="newText">
<textarea rows="4" cols="40" data-ng-model="newTextInput"></textarea>

And then you can grab the value in the model newTextInput when you click the submit button if the third one is selected.

DEMO

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Angular radio buttons are not checked correctly

분류에서Dev

Magento custom option with radio buttons on the same row

분류에서Dev

Angular JS table with ng-repeat and radio buttons

분류에서Dev

Trying to disable radio buttons

분류에서Dev

Working with Radio Buttons

분류에서Dev

radio_buttons with jquery

분류에서Dev

console out checked radio buttons

분류에서Dev

getting multiple radio buttons in rails

분류에서Dev

Validation Rule for Radio buttons wpf

분류에서Dev

Toggle Radio buttons on click angularjs

분류에서Dev

jquery가있는 radio_buttons

분류에서Dev

jquery switching array list with radio buttons and checkboxes

분류에서Dev

Disable Radio Buttons If Table Value Is 1 or more

분류에서Dev

Populate Text Input With Form Buttons

분류에서Dev

Add buttons for custom styles to CKEditor

분류에서Dev

Angular $http with bbc radio api

분류에서Dev

How can I test Mailchimp radio buttons in PHP?

분류에서Dev

Using jQuery to check if one in set of radio buttons is checked

분류에서Dev

changing image using onclick tag of dynamically created radio buttons in php

분류에서Dev

Getting the combination of selected radio buttons to show message on button click

분류에서Dev

Set the size of radio buttons styled horizontally , that suit for all screen sizes

분류에서Dev

ko.js: Dynamically generated radio buttons and 'checked' dependent computations

분류에서Dev

Angular 8 Radio 참 거짓

분류에서Dev

Hadoop Mapreduce: Custom Input Format

분류에서Dev

collection_radio_buttons [Ruby on Rails]에 클래스 추가

분류에서Dev

Do Metro app data input forms have save and cancel buttons?

분류에서Dev

Excel Custom Ribbon button calling subroutines for other ribbon buttons

분류에서Dev

Set a custom buttons font without being overridden by the value set in the storyboard

분류에서Dev

adding buttons at custom places in windowsform c# panel

Related 관련 기사

  1. 1

    Angular radio buttons are not checked correctly

  2. 2

    Magento custom option with radio buttons on the same row

  3. 3

    Angular JS table with ng-repeat and radio buttons

  4. 4

    Trying to disable radio buttons

  5. 5

    Working with Radio Buttons

  6. 6

    radio_buttons with jquery

  7. 7

    console out checked radio buttons

  8. 8

    getting multiple radio buttons in rails

  9. 9

    Validation Rule for Radio buttons wpf

  10. 10

    Toggle Radio buttons on click angularjs

  11. 11

    jquery가있는 radio_buttons

  12. 12

    jquery switching array list with radio buttons and checkboxes

  13. 13

    Disable Radio Buttons If Table Value Is 1 or more

  14. 14

    Populate Text Input With Form Buttons

  15. 15

    Add buttons for custom styles to CKEditor

  16. 16

    Angular $http with bbc radio api

  17. 17

    How can I test Mailchimp radio buttons in PHP?

  18. 18

    Using jQuery to check if one in set of radio buttons is checked

  19. 19

    changing image using onclick tag of dynamically created radio buttons in php

  20. 20

    Getting the combination of selected radio buttons to show message on button click

  21. 21

    Set the size of radio buttons styled horizontally , that suit for all screen sizes

  22. 22

    ko.js: Dynamically generated radio buttons and 'checked' dependent computations

  23. 23

    Angular 8 Radio 참 거짓

  24. 24

    Hadoop Mapreduce: Custom Input Format

  25. 25

    collection_radio_buttons [Ruby on Rails]에 클래스 추가

  26. 26

    Do Metro app data input forms have save and cancel buttons?

  27. 27

    Excel Custom Ribbon button calling subroutines for other ribbon buttons

  28. 28

    Set a custom buttons font without being overridden by the value set in the storyboard

  29. 29

    adding buttons at custom places in windowsform c# panel

뜨겁다태그

보관