Hello.
I have the following questions.

Let's suppose I have, say, a person model which has an id, a name and a 
boolean that tells whether this person is native from a specific country or 
not (for example, native from Argentina or not).

In the case of being native, he has a national document, otherwise, he has a 
passport.

So, the first question: is ok to have a person model that has one passport 
or one national document? Maybe I should make this person to have one 
generic document which then can be a passport or a national document.

The second question would be: how can I change the form fields dynamically 
in the view depending of the person being native or foreign? I mean, if the 
person is native, the "add person" form should have a "national document" 
field present whereas if the person is foreign, the field present should be 
"passport" instead of "national document".

Hope I made myself clear. If not, please tell me where I'm not being so.
It's very important for me to discuss this as I'm working on a project which 
model is very dependant on the nationality of the people.

Thank you very much.
Andrés

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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/cake-php?hl=en

Reply via email to