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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:16:45+00:00 2026-05-12T18:16:45+00:00

This may seem like an odd one, but I want to be able to

  • 0

This may seem like an odd one, but I want to be able to fill in a static web form using values passed in via a GET param list.

Say I have a page, ‘self.html’:

<form action="self.html" method="get" accept-charset="utf-8">
  <label for = "40">New Question?</label>
  <input type="radio" name="40" id="40" value="Yes"> Yes &nbsp;
  <input type="radio" name="40" id="40" value="No"> No
  <label for = "41">What's your favourite colour?</label>
  <input type="text" name="43" value="" id="41">
</form>

I need the form to submit itself whenever an input changes:

  $(document).ready(function(){
    $('input').change(function(){
      $("form:first").submit();
    });
    // collate_results();
  });

but obviously I want to keep the values, so that they’re not reset on the reload.

(Why? Because I’m doing it in a FileMaker web view, and the only way to pull data out of a form is to get the source – url – and parse it… hence I need to url to update to reflect the current state of the form, and also be able to pass in the data for any new records I want to display…)

UPDATE:

Here’s my non-working code – it’s fine single value fields, but fails for radio buttons…

$('input').change(function(){
  $("form:first").submit();
});
var qString = jQuery.url.attr("query");
if(qString) {
  qString = qString.split("&");
  $(qString).each( function() {
    var parts = this.split("=");
    var item = $('#'+parts[0]);
    if($(item).attr('type') == 'text') {
      $('#'+parts[0]).val(parts[1]);
    };
    if($(item).attr('type') == 'radio') {
      $(item).each(function() { 
        console.log(this);
        if($(this).val() == parts[1]) {
          $(this).attr('checked','checked');
        } else {
          $(this).attr('checked','');
        }
      });
    };
  })
}
});

The problem is that I will have multiple radio buttons with values of yes, no, na on the form, so the way that jQuery wants to do it doesn’t seem to apply. I can re-id the radio button if that helps…

<form action="self.html" method="get" accept-charset="utf-8">
  <label for = "40">New Question?</label>
  <input type="radio" name="47" id="47_yes" value="Yes">Yes &nbsp;
  <input type="radio" name="47" id="47_no" value="No" checked> No
  <label for = "48">What's your favourite colour?</label>
  <input type="text" name="48" value="" id="48">
</form> 
  • 1 1 Answer
  • 1 View
  • 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-12T18:16:45+00:00Added an answer on May 12, 2026 at 6:16 pm

    Here’s something that sort of works… but still having problems with url encoding and decoding of values…

    $(document).ready(function(){
      $('input').change(function(){
        $("form:first").submit();
      });
      var qString = jQuery.url.attr("query");
      if(qString) {
        qString = qString.split("&");
        $(qString).each( function() {
          var parts = this.split("=");
          var items = $("input[name^='"+parts[0]+"']");
          var myval = decodeURI(parts[1]);
          $(items).each(function() {
            var item = this;
            if($(item).attr('type') == 'text') {
              $('#'+parts[0]).val(myval);
            };
            if($(item).attr('type') == 'radio') {
              if($(item).val() == myval) {
                $(item).attr('checked','checked');
              } else {
                $(item).attr('checked','');
              }
            };
          });
        })
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may seem like an odd question but I was talking to a friend
this may seem like a very simple question, but I want to dump some
This may seem like an odd question, but I need to find a closed-source
This may seem like an odd question, but I have my own reasons for
This may seem like an obvious thing, but I can't find it. When using
This may at first seem like an odd question, but when a cin request
This may seem like an odd question, but does anyone know the origin of
This may seem like an odd thing to ask, but it'd take me forever
This may seem an odd thing to want to do but ignoring that, is
This may seem like an odd question, but it's something I couldn't solve on

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.