jjrjr1
Posts: 942
|
| Posted: 04/02/2008, 6:54 AM |
|
Hi
Does anyone know how to make list boxes and check boxes work properly with mutiple values checked?
It would be nice to make these controls function as they are suppose to.
Let me know if you do.
Thanks
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
DonB
|
| Posted: 04/02/2008, 8:58 AM |
|
They're not broken. If you want multiple values stored somewhere, you have
to store them with your own event code because there's no practical way to
automatically know 'what field goes where' from the form data alone. HTML
forms simply don't convey enough information to determine that. For
example, do the multiple values go into multiple rows of some other table,
or do they go into separate columns of a single row of the data source
table?
--
DonB
"jjrjr1" <jjrjr1@forum.codecharge> wrote in message
news:547f390096f0c1@news.codecharge.com...
> Hi
>
> Does anyone know how to make list boxes and check boxes work properly with
> mutiple values checked?
>
> It would be nice to make these controls function as they are suppose to.
>
> Let me know if you do.
>
> Thanks
>
> _________________
> Cheers
> John
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
|
|
|
 |
jjrjr1
Posts: 942
|
| Posted: 04/02/2008, 10:23 AM |
|
Hi Don
I figured that out for checkboxes.
What I am doing is I have a list of interests that are check boxes I want them all in one field separated by commas.
This code in the validate event works fine. The control is usr_interest and updates a data field of the same name.
$JRinterests = CCGetParam("usr_interests");
$i=0;
while ($JRinterests[$i]){
$JRdbinterests=$JRinterests[$i].$Comma.$JRdbinterests;
$Comma=",";
$i++;
}
$Container->usr_interests->SetValue($JRdbinterests);
The problem now is when the record is recalled, setting the CHECKED parameter in the HTML for diaplay.
I have been looking in Classes.php and see something called Value in the class for the checkbox list control But not to sure how to use it to get the display properly.
Have any thoughts.
Also, There is no way to create a multi select list box in CCS besides manually editing the HTML and placing the MULTIPLE tag in. I presume my code here will work for that as well but getting SELECTED in the html to highlight the selected values in the dropdown have the same problem as checkboxes.
Thanks again. Hopw you have an idea here.
John
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
|