/    Sign up×
Community /Pin to ProfileBookmark

Tabs to display sections of a form

I’ve had this question in another forum, but there’s not much activity over there, so if y’all don’t mind, I’ll ask here…..

Simple form with multiple columns and quite a few rows, used to maintain data (standard add/update/delete/select stuff). Data is music, and I’d like to have tabs to separate the sections – a tab for classical, jazz, rock, etc. All the data is coming from the same table set, my html is in a single php file, and the processing is all in a single php file. I can display the tabs, but I don’t understand how to get the pieces to work together.

First, before I chase this and waste everybody’s time, is using tabs a good way to make a form that’d otherwise scroll through multiple sections?

The tabs appear to use a list of hrefs like

<li><a href=”abcdform.php”>a</a></li>
<li id=”selected”><a href=”#”>b</a></li>

I can see that the first li is going to jump to “abcdform.php”, and the “#” in the second doesn’t appear to do anything. How do I get php to know what tab was selected so I can go retrieve the right data for that section?

It seems like I’d need something like:
<li><a href=”abcdform.php”><some tag that tells php “classical”>classical</a></li>
<li><a href=”abcdform.php”><some tag that tells php “jazz”>jazz</a></li>
<li><a href=”abcdform.php”><some tag that tells php “rock”>rock</a></li>

but how do I get the stuff topass back and forth?

to post a comment
HTML

0Be the first to comment 😎

×

Success!

Help @dkperez spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...