You need to sign in to do that
Don't have an account?
hacksawblade16
Make first radio button checked by default
var orgRadioData= j$('input[name=pradios]:radio:checked').val();
<input type="radio" value="{!ppls.id}" name="pradios"/>
How can i make the first radio button of the family checked by default
Hi,
If you make use of <apex:inputCheckbox>, use the attribute - selected = true. This will select the corresponding checkbox by default.
In html, use checked="yes"
Thanks
By using the checked attribute .The last radio button in the family is getting checked.I want the first radio button to be checked by default.
Thank you
Hi,
"checked" attribute will make the corresponding checkbox checked.
Otherwise, Use a boolean variable from the controller and set the value to true or false. Use this boolean variable in "Checked.
Thanks
<input type="radio" value="{!houses.id}" name="hradios" checked="{!houses.selction}" />
</apex:column>
Even by doing this the last radio button of the column is getting selected.I want the first radio button in the column to be selcted.
Thank you
Why dont you try <apex:inputCheckbox>?
I got the issue now.
Check the below link: http://boards.developerforce.com/t5/Visualforce-Development/How-to-set-the-selected-radio-button/td-p/189365
I am using the same checked attribute but only the last row is geting selected everytime!
<input type="radio" checked="{!sqw.isChecked}" name="<strong>selectRadio</strong>" >
even though in the Inspect Element I can see that only the row I want has checked="checked"..
Why would this happen?