Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6069507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:49:47+00:00 2026-05-23T09:49:47+00:00

I have a form with two radio button groups. The form doesn’t have a

  • 0

I have a form with two radio button groups. The form doesn’t have a submit button but will have a <a href="varible address"> instead.

When the users clicks the A tag it will take them to a different place depending on which radio button options they’ve selected.

i.e

radiogroupone value ="YES"

radiogrouptwo value ="YES"

Result = <a href="www.addressone.com">Continue</a>

radiogroupone value ="YES"

radiogrouptwo value ="No"

Result = <a href="www.addresstwo.com">Continue</a>

radiogroupone value ="No"

radiogrouptwo value ="No"

Result = <a href="www.addressthree.com">Continue</a>

radiogroupone value ="No"

radiogrouptwo value ="Yes"

Result = <a href="www.addressfour.com">Continue</a>

I’d like to use jquery to perform this im quite new to anything other than the complete basics with jquery. I think i need to use IF statements and VARIBLES.

<form name="formone" id="optionsform">
<fieldset>
<label><input type="radio" name="group1" id="ac-yes" value="Yes">Yes</label>
<label><input type="radio" name="group1" id="ac-no" value="No">No</label>

<label><input type="radio" name="group2" id="bt-yes" value="Yes">Yes</label>
<label><input type="radio" name="group2" id="bt-no" value="No">No</label>

<a href="varible-address">CONTINUE</a>
</fieldset>
</form>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:49:47+00:00Added an answer on May 23, 2026 at 9:49 am

    I’d go with something along these lines:

    $('#optionsform input[type="radio"]').click(function() {
        var g1 = $("#ac-yes").is(":checked");
        var g2 = $("#bc-yes").is(":checked");
    
        var addr = "";
        if (g1) {
            if (g2) addr = "www.addressone.com";
            else    addr = "www.addresstwo.com";
        } else {
            if (g2) addr = "www.addressfour.com";
            else    addr = "www.addressthree.com";
        }
        $("#optionsform a").attr('href', addr);
    });
    

    Simply retrieve the checked state of the ‘Yes’ buttons in each of your groups and decide upon that. Since you want the URL of your link to change whenever you change the selection, you bind the function to the click event of all the radio buttons.

    A small tip is that adding a class to all your radio buttons would simplify the #optionsform input[type="radio"] selector to just .yourclass.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP form that presents the user with two radio button options
I have a contact form with two radio buttons. But I need to show
I have two radio buttons on my MVC form that I use to hide
I've got a form where I have two radio buttons and two interchangeable controls
I have form with one input for email and two submit buttons to subscribe
Im using the bog standard form validation plugin. I have two radio buttons 'yes'
I have a form that has two views. These views are controlled by radio
Basically i have two radio button inputs if value A (yes) is clicked then
I'm having trouble submitting radio button values. I have two radio buttons set up
I have two radio buttons on my form and up until I started using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.