views:

171

answers:

1

I have a legacy PHP form that I'm moving over to Drupal 6. I'm trying to make things easy for me as well as the future admins of the site. The below form is the heart of the old site data. So far in cck I have Locations, in taxonomy I have Countries, now I just need to allow these Species data to be added. I would do it in CCK, but I also want to be able to add N number of Species to each form with all 12 Quadrats of % Cover and Density. (For each species in that location there is % Cover, Density, Flower, Fruit, etc ie alot of data!)

Basically my question is, can this form be accomplished in 1) CCK where the whole form can be filled out on one page, 2) by creating a custom CCK field to enter in a Species (using FormAPI) or 3) bite the bullet and write a custom module with FormAPI fields and keep track of the data in tables myself?

Thanks for your insight.

PHP form

A: 

It can be helpful to think of CCK the way you would an Object Oriented challenge: what are my Things, and how do they relate to each other.

If I'm reading you correctly, you're creating some kind of Botanical Entry type. I gather that Location is set up as a separate type, and that field could be a node reference in BE. (Or perhaps it's just a list in an text field with a drop down widget.) Same thing with Transect and Station. Researchers could be a user reference field.

Then you want to add your species data (the second form). I don't really know what all those fields are for, but I'll bet that interface could be simplified. Species might be a separate CCK type, which you'd connect via node reference, or you could create a custom CCK field type. Either way, you could allow adding more than one of those to a node to get the mulitple entries. If you do the node reference approach, you could probably use http://drupal.org/project/popups_reference to make the adding easier.

HTH

sprugman
My goal is to keep everything on one page because this is to enter data sampled in the field and they'll have all the data on a printed form that will look similar to the form above. I haven't found many modules that include a separate CCK type in another via node reference that doesn't have issues. The popup looks liek it could work, but I want to make it as simple as possible. Looks like I'll be leaning more towards the custom field type.
Jeremy Heslop

related questions