-2

The code that i use for arraylist and the way i code for hide the arraylist is like this

<?php 
    echo arraySelect($companies, 
                     'project_company', 
                     'type="hidden" 
                      class="text" 
                      size="1"', 
                      ($project->project_company=2), true);
?>

But when i test this code it doesn't show me the arraylist hidden, so can i know where the problem is and how to fix it?

Saju
  • 3,201
  • 2
  • 23
  • 28
newbie
  • 41
  • 11
  • 1
    we don't know what `arraySelect` does. Please show us some code – Peter Jan 28 '13 at 02:23
  • arraySelect is just a dropdown list, what i want is just hide the dropdownlist, is the arraySelect code important affected can't hide the dropdown list? – newbie Jan 28 '13 at 02:31
  • basing on information you provided - if you want to hide the arraySelect - just remove it from code. _If you ask a vague question, you’ll get a vague answer. But if you give us details and context, we can provide a useful answer._ – Peter Jan 28 '13 at 02:34
  • maybe the way i asked is wrong, i just can't figure out although i code `type = "hidden"`, the dropdown list is still appear, sorry for the question – newbie Jan 28 '13 at 02:41
  • no need to apoligzes. Now you put some more details here so I can help you :) please check my answer below. And it's not and PHP issue it's HTML issue – Peter Jan 28 '13 at 02:48

1 Answers1

1

If output of your function is something like:

<select type="hidden" name="foo">
   <option>bar</option>
   <option>bar</option>
   <option>bar</option>
</select>

it won't work as there is no type attribute for <select> HTML tags. type=hidden works for input's only.

You have to hide the dropbox using css:

<select name="foo" style="display: none;">
...
Peter
  • 16,453
  • 8
  • 51
  • 77