using database values in a class

Author Message

rex nedoli

Sunday 04 January 2004 12:53:44 pm

I would like to create a class which would contain, among others, drop down list (selection). Not being much of a developer, I find myself confronted with two problems:

1. the list of values that I want to use this way (countries and states(provinces)) is long. Logic dictates that I store them in database tables and call them up somehow from the class. Is this possible, and how can I do it?

2. Assuming that the above is possible; and with the two list (tables) mentioned above -countries and states - i would also like to make the choice presented in the states selection list to be dependent upon the the choice made in the countries selection - e.g. if the country selected is "Canada", I would like the states list to present only the names of the provinces (states) in "Canada".

On top of being a soso developer, I only have 2.5 days experience with EZ publish - so I do need a some help :)

I, Rex

Kåre Køhler Høvik

Monday 05 January 2004 4:12:55 am

Hi

You should probably create a new datatype to do this. Take a look at this documentation page on how to create a new datatype: http://ez.no/developer/ez_publish_3/documentation/development/extensions/datatypes/new_datatype_

--
Kåre Høvik

Kåre Høvik

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.