How do you validate a SELECT field with m. lemos forms validation
class. I want to make sure the user has selected a product and not left
the field as the default of 'Select One'.
$form->AddInput(array (
"TYPE"=>"select ",
"NAME"=>"produc tid",
"ID"=>"producti d",
"VALUE"=>"Selec tOne",
"SIZE"=>1,
"OPTIONS"=>arra y(
"SelectOne"=>"S elect One",
"1"=>"Good" ,
"2"=>"Bette r",
"3"=>"Best" ,
),
"ValidateAsNotE mpty"=>1,
"ValidationErro rMessage"=>"Ple ase specify a product.",
"LABEL"=>"< u>P</u>roduct",
"ACCESSKEY"=>"P "
));
Thanks for any input you can give.
P.S. Manuel this is an awesome class. Great Work!!
James
class. I want to make sure the user has selected a product and not left
the field as the default of 'Select One'.
$form->AddInput(array (
"TYPE"=>"select ",
"NAME"=>"produc tid",
"ID"=>"producti d",
"VALUE"=>"Selec tOne",
"SIZE"=>1,
"OPTIONS"=>arra y(
"SelectOne"=>"S elect One",
"1"=>"Good" ,
"2"=>"Bette r",
"3"=>"Best" ,
),
"ValidateAsNotE mpty"=>1,
"ValidationErro rMessage"=>"Ple ase specify a product.",
"LABEL"=>"< u>P</u>roduct",
"ACCESSKEY"=>"P "
));
Thanks for any input you can give.
P.S. Manuel this is an awesome class. Great Work!!
James
Comment