M. Lemos's form class questions

From: Date: Wed, 11 Oct 2000 04:33:16 +0000
Subject: M. Lemos's form class questions
Groups: php.general 
Request: Send a blank email to php-general+get-19490@lists.php.net to get a copy of this message
Hi, Has someone managed to create drop down <select> box, based on a SQL query, using Manuel Lemos' excellent form class? The class requires to define an array, like: $subscription->AddInput(array( "TYPE"=>"select", "NAME"=>"city", "VALUE"=>"unknown", "OPTIONS"=>array( "unknown"=>"Unknown", "0"=>"New York City", "1"=>"Washington", "2"=>"San Francisco" ), "ValidationErrorMessage"=>"Please select a city." )); and later on calls the method: $subscription->AddInputPart("city"); I can create a function, which prints/echos this part from the query: $subscription->AddInput(array( "TYPE"=>"select", "NAME"=>"city", "VALUE"=>"unknown", "OPTIONS"=>array( "unknown"=>"Unknown", "0"=>"New York City", "1"=>"Washington", "2"=>"San Francisco" ), "ValidationErrorMessage"=>"Please select a city." )); , but how can I feed it here: $subscription->AddInputPart("city"); so that it would be accepted? Also, how can I validate the selection, that it would require to select one of the cities? Thanks for the help. Art __________________________________________________ Do You Yahoo!? Get Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/

« previous php.general (#19490) next »