[web2py] Best way to have form submit disabled until file selected

2022-04-10 Thread António Ramos
Hello i have a form with a file to upload.
What is the best web2py way to have the submit button disabled until the
user selects a file  to upload?
Regards
António

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAEM0BxNSqWNN-aOA%2BhnfQQV5vbCHezsGBb40xVTPzuMiM67PSw%40mail.gmail.com.


[web2py] Re: Grouping information with its client

2022-04-10 Thread mostwanted
I was able to figure this out & this is how i did it:


Owner
Gender
ID Number
Relationship
Policy
Category 1
Category 1 Premium
Category 1 Benefits
Category 2
Category 2 Premium
Category 2 Benefits

{{for nu in nuclear:}}


{{=client_name(nu.client)}}
{{=nu.client.gender}}
{{=nu.client.id_number}}
{{=nu.client.relationship}}
{{=nu.policy_1}}

{{=nu.member_only.package_name}}
{{=nu.member_only.montly_subscription}}
{{=nu.member_only.take_away_package}}

{{=nu.member_and_newclear_family.package_name}}
{{=nu.member_and_newclear_family.montly_subscription}}
{{=nu.member_and_newclear_family.take_away_package}}




{{=client_name(nu.client)}}
{{=nu.spouse_full_name}}
{{=nu.relationship}}
{{=nu.id_number}}


{{for ch in children:}}
{{if ch.client.id==nu.client.id:}}
{{=client_name(ch.client)}}
{{=ch.childs_full_names}}
{{=ch.relationship}}
{{=ch.policyCover.package_name}}
{{=ch.policy_benefit}}
{{pass}}

{{pass}}

{{for pr in parent:}}
{{if pr.client.id==nu.client.id:}}
{{=client_name(pr.client)}}
{{=pr.full_name}}
{{=pr.relationship}}
{{=pr.policy_1}}
{{=pr.parent_policy.package_name}}

{{=pr.parent_policy.montly_subscription}}
{{pass}}

{{pass}}

{{for ex in extended:}}
{{if ex.client.id==nu.client.id:}}
{{=client_name(ex.client)}}
{{=ex.full_names}}
{{=ex.relationship}}
{{=ex.policy_1}}
{{=ex.extended_family.package_name}}

{{=ex.extended_family.montly_subscription}}
{{pass}}

{{pass}}
{{pass}}


currently so far so good
On Saturday, April 9, 2022 at 9:13:03 PM UTC+2 mostwanted wrote:

> Guys i need help here, I have an insurance database that has 3 tables of 
> information that relates to the client (account holder), what i want to do 
> is to be able to group each piece of information according to its owner 
> (account holder) in an html table in the view and not have it mixed up. 
> Have client A details in row 1, client A children details in row 2 and 
> client A parents information in the following row. From there client B and 
> his information in the subsequent rows then client C & so on. How can i 
> achieve this??
>
> *MODELS*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *db.define_table('client',Field('gender', 
> requires=IS_IN_SET(['Mr', 'Mrs', 'Miss'], zero='---Select Gender---')),
> Field('last_name', requires=IS_NOT_EMPTY()),
> Field('first_name', requires=IS_NOT_EMPTY()),
> Field('id_number', requires = IS_MATCH('^\d{9}?$', error_message='An ID 
> Number should have exactly 9 digits')))db.define_table('children',  
>   Field('client', 'reference client', writable=False),
> Field('gender', requires=IS_IN_SET(['Male', 'Female', 'None'], 
> zero='---Select Gender---')),Field('childs_full_names', 
> requires=IS_NOT_EMPTY()),Field('dob', 'date', 
> requires=IS_NOT_EMPTY()),  
>  )db.define_table('parents_and_in_laws',Field('client', 
> 'reference client', writable=False),Field('gender', 
> requires=IS_IN_SET(['Mr', 'Mrs', 'Miss', 'None'], zero='---Select 
> Gender---')),Field('full_name', requires=IS_NOT_EMPTY()),  
>   Field('id_number', requires = IS_MATCH('^\d{9}?$', 
> error_message='An ID Number should have exactly 9 digits')),
> Field('relationship', requires=IS_NOT_EMPTY()))*
>
> *Controller:*
>
>
>
>
>
> *def client_policy_packages():
> nuclear=db(db.newclear_family.).select(db.newclear_family.ALL)
> children=db(db.children).select(db.children.ALL)
> parent=db(db.parents_and_in_laws).select(db.parents_and_in_laws.ALL)
> extended=db(db.extended_family).select(db.extended_family.ALL)return 
> locals()*
>
> *View:*
>
> **
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/d0c48240-b7ed-4f8d-8a04-e57d674b179an%40googlegroups.com.