Hello,

I have a model named Customer with 4 fields which is required if customer is
a company and 3 another fields if the customer is a person and some other
fields common for both.
The type is defined by a string field named customer_type which have
'company' or 'person'.

How I can hide/show these fields by the select tag value?


I think this:

1. Start with fields for company and person hidden
2. Select the type of customer
3. Show the fields for selected type


This situation is very common for me. Actually I show all fields with a
description saying it can be blank but this is not elegant for user.


It can be developed using JS but, how? Suggestions?

-- 
Regards,

Gabriel Sobrinho
E-mail: [email protected]
Phone: +55 31 8775 8378

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to