0weavern Posted September 16, 2010 Share Posted September 16, 2010 I'm using a PHP helpdesk script, but when a customer submits a ticket, they are able to assign a category. I want to be able to have the category function so I can move tickets around, but only allow customers to assign to one. (Basically I want to hide the Select Box on the new ticket page) This is the code which displays the select box: <td style="text-align:right" width="150"><?php echo $hesklang['category']; ?>: <font class="important">*</font></td> <td width="80%"><select name="category"> Can you tell me what I can do to "hide" the category select box without getting rid of it? (The page requires a variable for category) Thanks Quote Link to comment Share on other sites More sharing options...
Psycho Posted September 16, 2010 Share Posted September 16, 2010 Just change it to a hidden field with the same name with whatever default value you want to use. Quote Link to comment Share on other sites More sharing options...
0weavern Posted September 16, 2010 Author Share Posted September 16, 2010 That's what I'm asking for help on, how do you hide a field? Quote Link to comment Share on other sites More sharing options...
Psycho Posted September 16, 2010 Share Posted September 16, 2010 That's what I'm asking for help on, how do you hide a field? I didn't say to hide the field, I said to make it a hidden field. There is a difference. The select field is created within a variable and you didn't show how that variable is created. But, here is the basic format of a hidden field <input type="hidden" name="foo" value="bar" /> Alternatively, you could keep it as a select field and hide it using CSS styles. <span style="display:none;">-- select field goes here --</span> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.