Creating cck/bio fields by "hand"

jim_at_miramontes - February 25, 2009 - 01:59

My client has put together a complex set of user specifications using the Bio module and CCK. That is, there's a content type called "Member Profile" with a bunch of attributes underneath it -- first name, last name, etc. The result is that there is an entry in content_type_bio with all this stuff in it. Or, rather, that's what's supposed to happen.

The problem I'm facing is that we're replacing the standard user registration procedures with new, custom code that collects the information in wizard-like ways. Therefore, I have to write a multi-step registration module that gathers up all the stuff from the user and drops it into the database in the appropriate places. That's what's killing me -- I can get the user created by passing an array of form values to user_register_submit, but I can't get the Bio/CCK values into the database. I'm trying to do this by calling bio_user_register_submit with the array of form_values; I can see the values getting passed into the content module's content_fields function, where it seems like it ought to get written to the database, but it's not. I've experimented with giving different names to the fields (e.g., "first_name" vs. "field_first_name" vs. "field_first_name_value") as that seems to be relevant in various parts of the code, but none of it is working. I suppose the, um, pragmatic approach to all of this is to ignore the system functions that are supposed to do all this work for me and simply bash the values into content_type_bio, but I've been resisting going that route.

This has been driving me nuts for a couple of days now, and I'm starting to freak out. Have I explained any of this clearly enough to make any sense, and does anyone have any advice? Thanks very much!

 
 

Drupal is a registered trademark of Dries Buytaert.