On Feb 20, 10:37 am, Julius Minka <[email protected]> wrote:
> I guess this solves the problem as of getting and setting the values in
> the form. Am I right, this doesn't solve getting respective days value
> from the database? Here I see the main problem for me - after selecting
> company_name to get respective days from DB for calculation.
> Julius

A couple of ways to solve this:

1) Caution: this idea might not sit well with the HTML police.
You could modify the OptionsWidget class in SQLFORM so that the
options in you dropdown include the days field in the label of the
option, keeping the company in the value.
Then use jQuery to extract the label and use it in your calculation.

2) Use an ajax call to obtain the days for the selected company and
use the response in the calculation.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to