Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: [SOLVED] How to convert form dropdown to hyperlinks?

[SOLVED] How to convert form dropdown to hyperlinks? 14 years 7 months ago #7632

  • Joombler
  • Joombler's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
On my client's Events Listing page, the client wants to have hyperlinks to the different categories instead of the dropdown. Is there a way to code this? I took a crack at it but I'm not good enough at Javascript to figure this one out.

So for example, instead of
<form action="/index.php?option=com_dtregister&amp;task=category&amp;Itemid=2" method="post" name="sort">
  
                 <select name="category" id="category" onchange="submit()"><option value=""  selected="selected">View By Category</option><option value="0" >All</option><option value="1" >Cat 1</option><option value="2" >Cat 2</option></select>       
</form>

the client wants a typical list of hyperlinks to each of these items.

Thanks in advance!

Please Log in or Create an account to join the conversation.

Last Edit: by Joombler.

[SOLVED] How to convert form dropdown to hyperlinks? 14 years 7 months ago #7634

  • dthadmin
  • dthadmin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 5470
  • Thank you received: 3
So you need category links instead of the dropdown filter? First, you can hide the filter dropdown in DT Reg Configuration. Second, I'm going to suggest that you do NOT make code modifications for the links. You'll just have to do it again with future updates. I think the best idea would be this...

Create DT Reg category menu links for each category. Create a new menu to put these new menu items in. Then you will have your actual links that you need that you can place wherever you need. You could then make a module (or just use a menu module) and place that module above the content area, below, on the side... wherever it works best. Then users will have a spot where they can easily jump to any event category. If I were you, that's what I'd be selling to the client :)

Please Log in or Create an account to join the conversation.

[SOLVED] How to convert form dropdown to hyperlinks? 14 years 7 months ago #7641

  • Joombler
  • Joombler's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
Thanks so much! That almost works, except that I need the menu links to target the same position the event listing appears in, instead of opening a new page. I didn't see an option for that in the menu config panel. Is there a way I can hardcode that into the link?

Here's a screenshot to illustrate what I mean:
http://www.sunny16.net/screenshots/menu-target.gif

Please Log in or Create an account to join the conversation.

[SOLVED] How to convert form dropdown to hyperlinks? 14 years 7 months ago #7761

  • Joombler
  • Joombler's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
I just wanted to let you know that I figured out a hack for this problem.

First, I grabbed the code for the category pulldown and put it in a custom module.

Then, I set the size of the select tag to the number of items that were in the list, so they all showed at once.

Finally, I couldn't code out the vertical scrollbar, so I set the width of the form to 1000px in the style sheet so that it wouldn't be visible.

I still need to finish styling the form, but it works the way I want it to. Thanks again for the help!

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.247 seconds