You want to grab all the FormEntry objects that you want using an iterator and access your objects that way:
std::vector<cgicc::FormEntry> user_selections;
if(false == user_selections.empty()) {
for(std::string::size_type i = 0; i < user_selections.size(); ++i) {
std::cout << user_selections[i].getValue();
}
}
else {
// Nothing selected, maybe print an error message
}
If you don't care if the submission is emtpy obviously the code would be
simpler.
Stephen
On Friday 08 July 2005 08:15, Alverth, Daniel C wrote:
> Hello,
> My name is Dan Alverth and I'm using Cgicc. I have a dilemma.
>
> I construct a select object as follows:
> cgicc::select( ).set("name","Control Variables
> Box").set("size","10").set("multiple");
>
> I get the submitted form data as follows:
> cgicc::Cgicc.getElement("Control Variables Box") -> getValue( );
>
> But this only returns a single string (The first selected entry
> only).
> I lose all the other selections.
> If the user selected 5 entries, getValue( ) only returns the first
> selection.
>
> Is there a way to correct this problem?
>
> Thank you very much.
>
> Dan Alverth
> Associate Programmer
> Nielsen Media Research
> 150 N. Martingale rd.
> Schaumburg, IL 60173-2076
pgpcBK81YSGtZ.pgp
Description: PGP signature
_______________________________________________ help-cgicc mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-cgicc
