davocold Posted April 9, 2012 Share Posted April 9, 2012 Here is the text input box: <input type="text" name="english" onkeyup="transcrire()" id="pfc_words" title="<?php echo _pfc("Enter your message here"); ?>" maxlength="<?php echo $max_text_len; ?>"/> I have the following radio buttons: <input type="radio" name="language" value="" checked onClick="french();"/><label for="language">French </label> <input type="radio" name="language" value="" onClick="english();"/> <label for="language">English </label> i need a function to change the name of the text input "english" depending on the radio button selected. if the first radio button is selected i want the text input name set to "french" and if the second radio button is selected i want text input name set to "english". Quote Link to comment Share on other sites More sharing options...
Jessica Posted April 9, 2012 Share Posted April 9, 2012 I believe you should post this in the javascript forum. But if you only need this info for processing use the values in the language radio set. set one to french and the other to english, and check it when the form is submitted. $_POST['language'] will then tell you which it is. 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.