Form validation: un-hide submit button when a radio value is selected and text message is entered
开发者_Python百科I just want my "submit" button to un-hide (so user can push it) when a radio button is selected and a message is entered in the text box.
I'm using ruby on rails, but I think this may be a javascript/css question. please let me know.
(Also i'm using formalize for the form styling)
You should add an onchange (or onclick) event listener to the radio button and a keyup event listener to the text box, then check the values. http://jsfiddle.net/vHdBb/1/
精彩评论