Need some help with RADIO buttons forms

Reply

Join Date: Nov 2007
Posts: 34
Reputation: SergioQ is an unknown quantity at this point 
Solved Threads: 0
SergioQ SergioQ is offline Offline
Light Poster

Need some help with RADIO buttons forms

 
0
  #1
Dec 19th, 2007
So am using Perl to dynamically generate a form with radio buttons. And no, this is not a Perl question. Essentially the form allows the user to specificy which links to use for Line 1, 2, 3, etc. And this can be a long form. The problem I have is that in placing the links in the VALUE field, each link shows up on each radio button. Makes it very ugly.

Is there a way to label each radio button with just text, but have it's value be the link? I tried the code below, and am still searching. But when you're new to a certain language, even Googling doesn't just give up answers.

Thanks


HTML and CSS Syntax (Toggle Plain Text)
  1. <tr>
  2. <td>
  3. <label for "radio1"><input type="radio" id="radio1" name="line01" value=$primary_links[$y]>Line 1</label><br>
  4. <label for "radio2"><input type="radio" id="radio2" name="line02" value=$primary_links[$y]>Line 2</label><br>
  5. <label for "radio3"><input type="radio" id="radio3" name="line03" value=$primary_links[$y]>Line 3</label><br>
  6. <label for "radio4"><input type="radio" id="radio3" name="line04" value=$primary_links[$y]>Line 4</label><br>
  7. <label for "radio5"><input type="radio" id="radio4" name="line05" value=$primary_links[$y]>Line 5</label><br>
  8. </td>
  9. <td>
  10. $primary_links[$y]<p>
  11. </td>
  12. </tr>
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,382
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 217
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is online now Online
Code Monkey

Re: Need some help with RADIO buttons forms

 
0
  #2
Dec 19th, 2007
Well a label tag works in this way
  1. <label for="test">Test:</label>
  2. <input type="radio" name="test" />
You place your label's target outside of the label tags
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 34
Reputation: SergioQ is an unknown quantity at this point 
Solved Threads: 0
SergioQ SergioQ is offline Offline
Light Poster

Re: Need some help with RADIO buttons forms

 
0
  #3
Dec 19th, 2007
It seems to be because the VALUE is a full reference that this is happening.

So am guessing I need to consolidate all my links into a master array and make the value of each radio the element number of that array.

Ugh
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,382
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 217
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is online now Online
Code Monkey

Re: Need some help with RADIO buttons forms

 
0
  #4
Dec 19th, 2007
Make sure you're surrounding your values with quotes or it could create malformed HTML
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 34
Reputation: SergioQ is an unknown quantity at this point 
Solved Threads: 0
SergioQ SergioQ is offline Offline
Light Poster

Re: Need some help with RADIO buttons forms

 
0
  #5
Dec 19th, 2007
No, seriously, the values themselves are full URL links, and that's why the value shows up....so doing it another way.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC