Posting Template Request

2written posts
vulpionearned bits
offlinecurrently
vulpion
New Member
vulpion Avatar
So, I'm trying to get a jcink posting template that has 3 tabs.


I tried coding it myself. What I was trying to make was a 500x500px template with 3 buttons at the top (Post, Tracker, S.P.E.C.I.A.L.). It was a white background with a 5px black border, 13px verdana font, justified, with an invisible scrollbar- very basic.

When there was 1post made, it worked fine. All tabs reacted as expected- you click the button and it swaps tabs. The issue came when there was 2+ posts. All posts would be blank, except the first. So I tried coding it so each tab had a different name (Post1, Post2, etc...) and this time it half-worked. When I clicked a button, all other posts would have blank text boxes, except the post with the tab I selected...

So, I decided that I'm trash at this and figured if someone could make me a template that's a working version of my original attempt, I'd be able to see where I messed up.
phantom of the black parade
pronounsshe / her pronouns
4,237written posts
Kuroyaearned bits
offlinecurrently
Kuroya
Part of the Furniture
Kuroya Avatar
at this, the world's end, do we cast off tomorrow~!
to try taking an actual crack at fixing the original coding without seeing it... you'll need to give the ids and labels different values as well if you want it to work for multiple versions of the same template in the same thread. for proof of concept - my muse page on my multimuse blog, which uses the same basic tabbed coding layout for each of the boxes and works just fine.

honestly i'm not even 100% sure the name value needs to change too but i'd do it just to be safe. but. the values i'm talking about are right here. those need to be different for each instance of the template otherwise it'll just be referencing the same id and failing with each click since y'know, it can only reference the id once and only the most recent one at that.

<input type="radio" id="TABBERtab-1" name="NAMEtab-group-1">
<label for="TABBERtab-1"> label content </label>

basically actual tabs for a normal posting template is a pain because of that coding limitation so i'd actually recommend just. not. even using a checkbox or jquery for a toggle is a possible-ish workaround but even that's a lot more trouble than it's worth so. yeah.
last edit on Apr 16, 2019 1:30:06 GMT by Kuroya


stultifera navis
aliasnines
pronounsshe/her
535written posts
ninelieearned bits
offlinecurrently
ninelie
Part of the Furniture
ninelie Avatar
VOLITION [Medium: Success]
NicoleCodes made a great Javascript tabbed template that you can use multiple times without having to change ids for your radio buttons.

Here's a JSFiddle showing how a duplicate of the templates work without interfering with one another.
3,084written posts
Kitten4uearned bits
offlinecurrently
Kitten4u
Part of the Furniture
Kitten4u Avatar
[nospaces]

[attr="class","infoBG"]
[attr="class","infoBG2"]
[attr="class","infoBack"]
[attr="class","infoTitle"][attr="class","fa fa-star-o"] threadarchived
[attr="class","infoDiv"]

[attr="class","infoBody"]

To keep the forum clean and so people know that all threads in certain areas are current and that the OP is likely to still have interest, we archive threads that haven't gotten posts for 2 weeks. This thread is being archived for that reason. If you would like this thread reopened, contact a staff member.