0

Hi,

I want to make this field "Hidden" and want to select by default last option "Both". ho w i can do this?

           <input id="memberRoleIntlSeller" value="supplier" name="userrole" style="border: 0px none ;" onclick="document.getElementById('userrole-error').style.display='none';changesubmitbtnname('yes');"  type="radio" <? if($_REQUEST['userrole']=="supplier"){?>checked="checked"<? }else{echo "";} ?> />
                <font class="normal">
                <?=$suppliers_title?>
                </font></div>
              <div class="buyOrSellBox">
                <input id="memberRoleIntlBuyer" value="buyer" onclick="document.getElementById('userrole-error').style.display='none';changesubmitbtnname('yes');" name="userrole" style="border: 0px none ;"  type="radio" <? if($_REQUEST['userrole']=="buyer"){?>checked="checked"<? }else{echo "";} ?>/>
                <font class="normal">
                <?=$buyer_title?>
                </font></div>
              <div class="buyOrSellBox">
                <input id="memberRoleIntlBoth" value="both" onclick="document.getElementById('userrole-error').style.display='none';changesubmitbtnname('yes');" name="userrole" style="border: 0px none ;" type="radio" <? if($_REQUEST['userrole']=="both"){?>checked="checked"<? }else{echo "";} ?>/>

Best Regards,
Kashif

3
Contributors
5
Replies
25
Views
4 Years
Discussion Span
Last Post by kingkong142
0

I dont think that your question is clear enough. Which field do you want to hide? Anyways, you can try this;

 <input type="hidden" id="memberRoleIntlSeller" ...

Hope that helps

Edited by Webville312: Had to add a code fragment

0

Code for the last button:

<div class="buyOrSellBox">
<input id="memberRoleIntlBoth" value="both"
onclick="document.getElementById('userrole-error').style.display='none';changesubmitbtnname('yes');" 
name="userrole" style="border: 0px none ;" type="radio" 
<?
// the condition is:
// if $_REQUEST['userrole'] is not set (none of the radio buttons have been chosen)
// or the 'both' radio button has been chosen
// then make it checked
if(!isset($_REQUEST['userrole']) || (isset($_REQUEST['userrole']) && $_REQUEST['userrole']=="both")){
    echo 'checked="checked"';
}
?>
/>

I want to make this field "Hidden"

Which field do you want to make hidden - one button all the whole button group?

0

We want to hidden whole button group. With the default checked box "Both"

0

Wrap the button group in a div and make that div hidden:

<div id="button-group">

...

</div>

The CSS:

#button-group {
    visibility:hidden;
}
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.