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

  • Home
  • SEARCH
  • 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 8809943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:00:01+00:00 2026-06-14T03:00:01+00:00

I have a signup form which has a select box and, dependig on which

  • 0

I have a signup form which has a select box and, dependig on which option the user chooses, certain fields are made available. This works great with the below code which I got from another post:

<div id="option1" class="plan_options" style="display:none">display something</div>


$(function() {
    $('#plan').change(function(){
    $('.plan_options').hide();
        $('#' + $(this).val()).show();
    });
});

The only problem I have is that when someone comes to the signup form from the product pages I am passing a variable via a GET which is one of the plan options which the above code applies to. The select is properly populated with the right value but the above code doesn’t work and the div is not displayed. If I manually change to one of the appropriate selects (including the one passed through the GET it works fine – is there anyway to get the above code to use the value of the GET?

  • 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-06-14T03:00:02+00:00Added an answer on June 14, 2026 at 3:00 am

    It has something to do with .change(), since the change doesn’t actually happen through the GET value. You need to trigger the change on page load. Assuming you already captured and applied the variable from GET.

    FIDDLE

    Something like..

    $('document').load(function(){
        $('#plan').change();
    });
    

    Also, you should set up your function using the on() handler, like so

    $(function() {
    
        $('body').on('change', '#plan', function(){
            $('.plan_options').hide();
            $('#' + $(this).val()).show();
        });
    
    });
    

    Ultimately this would be your final code… 🙂

    $(function() {
    
        $('body').on('change', '#plan', function(){
            $('.plan_options').hide();
            $('#' + $(this).val()).show();
        });
    
        $('#plan').change();
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a signup form of which most fields are pre-filled using user's Facebook
I have a form allowing a user to signup for a news letter which
I have a signup form with 3 fields: Username Email Password On most browsers
I have a long signup form and would like to hide a few fields
I have a simple user signup form with a checkbox that lets users get
I have an iPad application which has a sign up form within it. The
I have a text form in which the user should enter an email address.
I have a form which when submitted goes to the url signup.php?username=xx where xx
I have a signup form: function SignupForm() { $fields = new FieldSet( new TextField(FirstName,
I'm confused with the REST routes: I have a user signup form where user

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.