Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
radio button checked by default
Old 10-02-2009, 06:05 PM radio button checked by default
Novice Talker

Posts: 5
Trades: 0
Hi

I have a section where when joining the customer must select if they are male or female.

as its a male orientated site, i want the male default button to be selected as default, but i dont know how to do this...

can anyone tell me what i need to do with this code

PHP Code:
<td class="infoBoxContents"><?php echo tep_draw_radio_field('gender''m') . '&nbsp;&nbsp;' MALE '&nbsp;&nbsp;' tep_draw_radio_field('gender''f') . '&nbsp;&nbsp;' FEMALE '&nbsp;' . (tep_not_null(ENTRY_GENDER_TEXT) ? '<span class="inputRequirement">' ENTRY_GENDER_TEXT '</span>'''); ?></td>
to make the MALE radio button checked by default

thanks heaps !
fernyburn is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-03-2009, 02:18 AM Re: radio button checked by default
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,898
Name: Keith Marshall
Location: Connecticut
Trades: 0
It all really depends on the user defined function tep_draw_radio_field() if there is an additional allowed arguments for extra html parameters. You can hard code the html radio form element manually.

PHP Code:
<td class="infoBoxContents">
  <input type="radio" name="gender" value="m" selected="selected" />&nbsp;&nbsp;<?php echo MALE?>&nbsp;&nbsp;
  <input type="radio" name="gender" value="f" />&nbsp;&nbsp;<?php echo FEMALE?>&nbsp;
  <?php if (tep_not_null(ENTRY_GENDER_TEXT)) echo '<span class="inputRequirement">' ENTRY_GENDER_TEXT '</span>'?>
</td>
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 10-05-2009, 10:56 PM Re: radio button checked by default
rednimaT's Avatar
Skilled Talker

Posts: 64
Name: Taminder B.
Location: San Jose, CA
Trades: 0
just add checked in the code
__________________

Please login or register to view this content. Registration is FREE

(HTML/PHP/MySQL/JavaScript/AJAX/SEO)
rednimaT is offline
Reply With Quote
View Public Profile Visit rednimaT's homepage!
 
Reply     « Reply to radio button checked by default
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30903 seconds with 12 queries