Obtain All Values from Multivalue Input Fields in WebBroker Applications
By Bob Swart, Delphi Pro

You use Delphi's WebBroker Technology to produce Web server applications. Good. You need to obtain user input through your HTML forms. Fine. But if the HTML forms have multivalue input fields like a multi-select listbox, the standard method of using the Values property will return only the first value and not the rest. Uh oh.

In this 10-Minute Solution, I will demonstrate how to obtain field values for HTML input forms in general. And more specifically, I will show you how to write a small routine that extracts all values from a multivalue input field in WebBroker applications.





With Delphi's WebBroker Technology, you can produce Web server applications and obtain user input with HTML forms. However, sometimes you'll need to obtain the data from multivalue input fields like a multi-select listbox, in which case the Values property returns only the first value and not the rest.



Using a small code routine, extract all values from a multivalue input field in WebBroker applications.

  
Next: WebBroker Technology in Action


Introduction Single-Value Input Fields
WebBroker Technology in Action Collecting Values from All Input Fields


Return to Get Help with Delphi Page

Return to Main Get Help Page
 


Find Out More
Dr. Bob on Delphi Web Modules

The WebBroker: CGI and ISAPI chapter from Charlie Calver's Delphi 4 Unleashed


TALK BACK
This month's 10-Minute Solution is necessary because the current implementation of Value returns only the first value and a string for the name (and not an index) must be specified to find values. What improvements would you make to Delphi to make this solution obsolete? Let us know in the database development discussion groups!
 





Sponsored Links