netfrugal Posted November 29, 2006 Share Posted November 29, 2006 I would like to submit a form with only 2 radio buttons: On / OffIs there a way to submit the form when I click one of the radio buttons, and not a submit button? Quote Link to comment Share on other sites More sharing options...
DeathStar Posted November 30, 2006 Share Posted November 30, 2006 Yes :oJust remove <input: submit blahblah>then ull have to pres enter to submit!or just creat [move]links![/move] Quote Link to comment Share on other sites More sharing options...
cmccully Posted November 30, 2006 Share Posted November 30, 2006 Try using javacript. use the on_click or on change property. You can have this function call your php function or the same page.Hope this helps.cmccully Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted November 30, 2006 Share Posted November 30, 2006 Put this in both of your radio buttons:[code]onclick="this.form.submit();"[/code]Example: [code]<form action="other_page"><label><input type="radio" name="test" value="yes" onclick="this.form.submit();" /> Yes</label> - <label><input type="radio" name="test" value="no" onclick="this.form.submit();" /> No</label></form>[/code] Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted December 1, 2006 Share Posted December 1, 2006 This requires js - IMO you should ALWAYS have a submit button with a from just to ensure everyone can use it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.