Hi,
I'm very new at this, so any help or advice will be much appreciated. I have a single page form with a very lengthy set of radio button items seperated by categories. I've set it up so that radio buttons are initially hidden, but when the user clicks a link with the name of the category, the page reloads showing just the category of items they've selected.
Unfortunately, this means that any form data already filled out gets lost when the page is reloaded with the desired radio button set. Here's the basic code (with extraneous bits cut out):
<fieldset>
<legend>Inventoried Item Selection:</legend>
<p>Choose From: <a href="?category=Apparel#item">Apparel</a> | <a href="?category=Stickers#item">Stickers</a><a name="item"></a></p>
[code=php]<?php
if ($_GET['category'] == 'Stickers') {
print '
<div>Select this item: <input type="radio" id="Item" name="Item" value="Silver Foil Stickers" /></div>
';}
else {
print ' ';}
?>[/code]
[code=php]<?php
if ($_GET['category'] == 'Apparel') {
print '
<div class="invselect">Select this item: <input type="radio" id="Item" name="Item" value="Baseball Caps)" /></div>
';}
else {
print ' ';}
?>[/code]
</fieldset>
I'm new here, so if I've presented the code incorrectly, I apologize. I'm just wondering if I'm doing this completely wrong or if there's a way, using what I've got so far, to show the desired radio button set without reloading the page. Or somehow pass the form data back to the page (even though the submit button hasn't been hit) so any form data already filled out by the user is retained. Thanks for any pointers you can give me...