CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Fix List Boxes & Check boxes to work properly.

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.