I am not able to find a solution out of this code.

I want to get rid of option 1(POST_EMAILOPTION_HIDE) & option 3 (POST_EMAILOPTION_SHOW) option and leave the option 2 (EMAIL_USEFORM) as default.

<table border="0" cellspacing="1" cellpadding="0">
                    <td><input name="showemail" type="hidden" value="0" <?php if($data['showemail']==EMAIL_HIDE) echo "checked"; ?>></td>
                    <td><?php echo $lang['POST_EMAILOPTION_HIDE']; ?></td>
                    <td><input name="showemail" type="radio" value="2" <?php if(!is_string($data['showemail']) || $data['showemail']==EMAIL_USEFORM) echo "checked"; ?>></td>
                    <td><?php echo $lang['POST_EMAILOPTION_USEFORM']; ?></td>
                    <td><input name="showemail" type="hidden" value="1" <?php if($data['showemail']==EMAIL_SHOW) echo "checked"; ?>>&nbsp;</td>
                    <td><?php echo $lang['POST_EMAILOPTION_SHOW']; ?></td>

can someone help me on this?


Hi Dave,

Can you please be more specific? What do you mean when you say you want to "get rid" of options 1 and 3?

Get rid of, would mean to delete?
So just highlight the text and delete it?
You may need to follow where the form stores and uses those values so no future errors occur.
Let us know how you go.

sorry guys if i have not been specific.

Actually i have these three radio buttons on one of the form. I want to make option 2 default and hide option 1 and option 3.


If you want to hide them.

Change the type to "hidden" rather than "radio".
If you want it default selected put checked at the end.

<input type="hidden" />
<input type="radio" checked />

Let me know how you go.

This article has been dead for over six months. Start a new discussion instead.