SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2008
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Zend Form : ->setMultiOptions() Help

    ->setMultiOptions($ExistingArray)
    Code:
    <option value="0" label="Select Genre">Select Genre</option>
        <option value="1" label="Adventure">Adventure</option>
        <option value="2" label="Biography">Biography</option>
        <option value="3" label="Business">Business</option>
    ... and so on. Adventure, Biography and Business being in my $ExistingArray.

    How can I set the value to be the same as the Option / Label rather than a numeric value?
    Last edited by Kyle W; Jun 2, 2009 at 14:55.

  2. #2
    SitePoint Zealot
    Join Date
    Nov 2008
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Reworded the question. I was very tired...

  3. #3
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use an associative array.

    ps- you can always look at the source code if you have trouble finding it in the documentation.

  4. #4
    SitePoint Zealot
    Join Date
    Nov 2008
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im still having trouble with this, looking through the zend frameworks source is a little rough. Anyone have any experience with this?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •