Author Topic: $form->select help  (Read 796 times)

0 Members and 1 Guest are viewing this topic.

Offline sasoriTopic starter

  • Enthusiast
  • Posts: 266
    • View Profile
$form->select help
« on: October 23, 2008, 10:48:36 PM »
help, how am I gonna insert or make the "To Recipient" form into a dropdown menu of the contacts usersname in the database?

Offline awpti

  • Enthusiast
  • Posts: 453
  • Gender: Male
    • View Profile
    • GoMySQL - DBA Blog and Tutorials
Re: $form->select help
« Reply #1 on: October 23, 2008, 10:51:54 PM »
Could you be a bit more vague, please?

What framework?

Tried a loop?
Server: Apache 2.2.3 - PHP 5.2.17, MySQL 5.0, 5.1, 5.5 and 6.0 - 2x Quad Core Xeon 5620 w/ 16G Mem
GeekLAN - Ignited Jobs - LAMP Tips

10+ Years of hobby PHP Development and Database Design.

Offline sasoriTopic starter

  • Enthusiast
  • Posts: 266
    • View Profile
Re: $form->select help
« Reply #2 on: October 23, 2008, 10:58:11 PM »
its a cake framework sir

here's the "i think" code of the recipient text box

Code: [Select]
   
    // autocomplete
    $formMailCompose .= $html->div('input text floatLeft',
        '<label for="Accounts/name">To</label>' .
            $ajax->autoComplete('_Account_', 'autocomplete', array(
            'afterUpdateElement' => 'updateHidden',
            'style' => 'width: 410px; margin-left: 30px;'
        )
    ));
   
    // target_id
    $formMailCompose .= $form->hidden('target_account_id', array(
        'id' => 'target_account_id'
    ));

so how am i gonna insert or  make the dropdown menu  to make it appear like
 
To Username: "dropdown here"

instead of

To Username: "input box here"