jQWidgets Forums
jQuery UI Widgets › Forums › Editors › CheckBox, RadioButton › How to pass value of RadioButton selected to POST array
Tagged: radio button
This topic contains 6 replies, has 5 voices, and was last updated by Peter Stoev 9 years, 3 months ago.
-
Author
-
What is the most efficient way to receive the value and not the Boolean of a jqxRadioButton when a form is submitted? The reason for wanting the value is that I need to insert the value into a database and as such the value is required. I know there are several approaches either through PHP or through jquery, however, I am trying to figure out which way would be the most efficient way; both, performance and coding in mind. Please include a code example.
Thank you.
Hi,
As a solution, set the “name” attribute of the RadioButton and when you submit your Form, you will be able to access its value from the Server by Name.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi, I’m stucking on a problem same as this post.
I got that Peter described above, but I am still finding another way.
Because, in that, I have to check all query parameters for radio buttons. I think that is not productive.
In the case of simple html radio button, a value which user chose can be got as a parameter on server.
Do we have no choice?Thank you.
I have the same confusion. I am wondering why in some aspect jqwidgets are powerful, but in some simple and common situation, it just performs barely satisfactory. It’s weired. Anyway, I like jqwidgets.
Hi rjgcmjl,
I don’t think that it is too hard to put “name” attribute in the HTML when you define the Radio Button’s DIV tag. If you don’t like such approach, define a Hidden Input field on your Form and update it’s value with the checked Radio Button of a Group of Radio buttons. This is very simple, too.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
I set the name of Radio Button by “name” attribute in “DIV” tag.
Please describe how can we set the value of each option that is posted to form?
RegardsHi Amir Zojaji,
If you want to set the button’s value, use its “val” method.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.