You need to sign in to do that
Don't have an account?
VF
Radio buttons
I have To Radio Buttons and two textboxes placed beside them.As shown:
<apex:panelGrid id="panelgrid" columns="2" >
<apex:selectradio id="replyTo1" value="{!ReplyTo}" onclick="ReplyToField(this);" > <apex:selectOption itemValue="replyToEmail"></apex:selectOption>
</apex:selectradio>
<apex:inputtext id="txt1" value="{!ownerEmail}" size="30"/><br/>
<apex:selectradio id="contactEmail" value="{!ContactEmail}">
<apex:selectOption itemValue="cntEmail" ></apex:selectOption>
</apex:selectradio>
<apex:inputtext id="txt2" value="{!contact.Email}" size="30"/>
</apex:panelGrid>
When i click on the Radio button i want the Textbox value displayed beside it in apex code.
How can i check which Radio button is clicked in the server side(Apex controller) and get the text box value of the Radio button clicked.
Or is there any other way to do so.as i dont have any idea on Radio Buttons.
Thanks
shaan
<apex:selectradio id="replyTo1" value="{!ReplyTo}" onclick="ReplyToField(this);" >
You would have defined get and set methods for the function {!ReplyTo} like Public String replyto {get;set;} .....
That's it... now the value that is selected is stored in the variable replyto... so if you say
<apex:inputtext value="{!Replyto}" > you would get the selected radio value... But i could see that you have two selectradio, why not make them into one if possible!!!
OutOftopic : Lol @ the smiley :D