I am building a property web site and need to capture clients' property requirements into a database (to be able to automatically match properties and e-mail them out) and at the same time register them to joomla.
The fields I will need to capture in the form are firstname, lastname, email, phonenumber, password, propcountry, propstate, proplocality, proptype, bedrooms, budget.
The propstate and proplocality fields need to be dynamic and chained to the propcountry field, i.e. propcountry -> populates propstate -> populates proplocality. Also the propstate and proplocality fields need to allow multiple selection as well as have an "all states" or "all localities" option.
The proptype field also needs to allow multiple selection.
These then need to be written to three tables (propcountry written to usercountry, propstate written to userstate, proplocality written to userlocatity, proptype written to usercatg) in the DB. The name (firstname+lastname), email and password also need to be written to the joomla users table.
Now my question is not how to do this, but can this be done using CF or is it better to code from scratch? If Cf is a suitable tool then I'll prepare a proper specification and post it in the "paid for work section".
The fields I will need to capture in the form are firstname, lastname, email, phonenumber, password, propcountry, propstate, proplocality, proptype, bedrooms, budget.
The propstate and proplocality fields need to be dynamic and chained to the propcountry field, i.e. propcountry -> populates propstate -> populates proplocality. Also the propstate and proplocality fields need to allow multiple selection as well as have an "all states" or "all localities" option.
The proptype field also needs to allow multiple selection.
These then need to be written to three tables (propcountry written to usercountry, propstate written to userstate, proplocality written to userlocatity, proptype written to usercatg) in the DB. The name (firstname+lastname), email and password also need to be written to the joomla users table.
Now my question is not how to do this, but can this be done using CF or is it better to code from scratch? If Cf is a suitable tool then I'll prepare a proper specification and post it in the "paid for work section".
Hi cyberdude,
Well, all of that is possible but it ends up being quite a complex form. I'm not quite clear why you are writing the results to three separate tables though.
Have you looked at extensions like com_properties which may have some of this built in?
Bob
Well, all of that is possible but it ends up being quite a complex form. I'm not quite clear why you are writing the results to three separate tables though.
Have you looked at extensions like com_properties which may have some of this built in?
Bob
Hi Greyhead
Thanks for responding so quickly. Yes, I've looked at some extensions and have decided I'll probably use EZRealty extension for the property functions but their client registration and management part is not that great. I'm migrating the data and functionality from an old site written in asp to this new site. I'll look at com_properties too.
The reason I had 3 tables is because that's how it works on the old site so structuring the new site's DB in a similar way would make importing the existing data easier.
If you have a better way of achieving the same result with a single table then I'm open to any suggestions.
If a client is looking for a property say in the UK (propcountry=1), in the Hertfordshire county (propstate=21) and is interested in the following towns, Harpenden (proplocality=35), St. Albans (proplocality=23), Redbourne (proplocality=33)and Weathhampstead (proplocality=65) then how would that be entered into a single table? In my 3 table set up it would look like this:
propcountry table
propstate table
proplocality table
The user is related to a number of localities. They can also be related to a number of states if they choose.
Thanks for responding so quickly. Yes, I've looked at some extensions and have decided I'll probably use EZRealty extension for the property functions but their client registration and management part is not that great. I'm migrating the data and functionality from an old site written in asp to this new site. I'll look at com_properties too.
The reason I had 3 tables is because that's how it works on the old site so structuring the new site's DB in a similar way would make importing the existing data easier.
If you have a better way of achieving the same result with a single table then I'm open to any suggestions.
If a client is looking for a property say in the UK (propcountry=1), in the Hertfordshire county (propstate=21) and is interested in the following towns, Harpenden (proplocality=35), St. Albans (proplocality=23), Redbourne (proplocality=33)and Weathhampstead (proplocality=65) then how would that be entered into a single table? In my 3 table set up it would look like this:
propcountry table
usercountryID UserID propcountry
1 101 1propstate table
userstatID UserID propstate
1 101 21proplocality table
userlocalityID UserID proplacality
1 101 35
2 101 23
3 101 33
4 101 65The user is related to a number of localities. They can also be related to a number of states if they choose.
Hi cyberdude,
If you have historic data in three tables then it's fine to stay that way.
For your example I'd probably look at something like:
user_id: 101, prop_country: 1, prop_state: 21, prop_locality: 33|35|23|65
Though using imploded array entries like that has its pluses and minuses and may not be the best way to go.
Bob
PS Nice area to buy property
If you have historic data in three tables then it's fine to stay that way.
For your example I'd probably look at something like:
user_id: 101, prop_country: 1, prop_state: 21, prop_locality: 33|35|23|65
Though using imploded array entries like that has its pluses and minuses and may not be the best way to go.
Bob
PS Nice area to buy property
This topic is locked and no more replies can be posted.
