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 622119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:56:59+00:00 2026-05-13T18:56:59+00:00

Okay i’m stuck on something here. This is the page i’m working on: https://www.passovermeal.org/

  • 0

Okay i’m stuck on something here.

This is the page i’m working on: https://www.passovermeal.org/

I have two radio buttons with text input fields attached to each.

If the second radio button is selected I would like to remove value from first text field.

Now if I click on an area on my page like a div with an id of #products I would like to remove the selected state of the second radio button and place the selected state back onto the first radio button and remove the amount that was entered into the second text area.

here are the set of radio buttons:

<div id="hiddenOtherAmountArea">
                        <input type="radio" value="9705" id="level_other" name="level_id" style="display:inline; margin-top:5px;" checked="checked" />
                        <!-- TODO: update value -->
                        <input type="text" id="other_amount" size="10" name="other_amount" value="" class="checked" />
                    </div>
                    <div id="otherAmountArea">
                        <input type="radio" value="9721" id="level_other" name="level_id" style="display:inline; margin-top:5px;" />Or enter another amount&nbsp;&nbsp;
                        <!-- TODO: update value -->
                        <input type="text" id="other_amount" size="15" name="other_amount" value="" class="otherChecked" />
                    </div>
  • 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-13T18:57:00+00:00Added an answer on May 13, 2026 at 6:57 pm

    First things first. You are re-using IDs. These must be unique for things to work properly. As it is, you have 2 elements named other_amount and two named level_other. This is a no-no.

    EDIT: As you stated, you need the reused IDs. I added classes to the elements (with the same name) to reference. Not sure what effect the repetitive IDs will have, if any. Something like this should otherwise work (if I understood your question).

    <div id="hiddenOtherAmountArea">
         <input type="radio" value="9705" id="level_other" class="level_other" name="level_id" style="display:inline; margin-top:5px;" checked="checked" />
         <!-- TODO: update value -->
         <input type="text" id="other_amount" class="other_amount" size="10" name="other_amount" value="" class="checked" />
    </div>
    <div id="otherAmountArea">
         <input type="radio" value="9721" id="level_other" class="level_other" name="level_id" style="display:inline; margin-top:5px;" />Or enter another amount&nbsp;&nbsp;
         <!-- TODO: update value -->
         <input type="text" id="other_amount" class="other_amount" size="15" name="other_amount" value="" class="otherChecked" />
    </div>
    

    You should be able to do something like this:

    $('#hiddenOtherAmountArea .level_other').change(function() {
        $('#otherAmountArea .other_amount').val('');
    });
    
    $('#otherAmountArea .level_other').change(function() {
        $('#hiddenOtherAmountArea .other_amount').val('');
    });
    
    $('#products').click(function() {
        $('#hiddenOtherAmountArea .level_other').attr('checked','checked');
        $('#otherAmountArea .other_amount').val('');
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

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.