I've tested this on CCK Text, Email, and Node Reference fields. When removed from their group, using the syntax described here, the prepopulate worked.

Running Drupal 5.1, PHP 4.3.10, Linux, MySQL 4.1.15

Comments

rjl’s picture

I was helping someone in the forums with a similar issue. This is the solution I posted there and it applies to this situation, so I thought I would post part of it here, hope that is OK.

Some information that helped me:

  • CCK fields append 'field_' to your natural field name such that if you created a field named 'website' CCK would change it to 'field_website'. If your natural field name had spaces in it, spaces are converted to '_' (underscores) such that if you created a field named 'web site' CCK would change it to 'field_web_site'
  • CCK allows multiple values for a field when that option is checked, the first is 0, the second 1, etc. This transalates your fields to [FIELD_NAME][0], [FIELD_NAME][1], etc. When multiple is not checked, then you just get the first of those: [FIELD_NAME][0].
  • A link field has multiple parts to it (url, title, etc.) even if you've disabled some of them. To reference those you need [FIELD_NAME][0][url], [FIELD_NAME][0][title], etc.
  • CCK allows you to group fields in a fieldset. If you have done that then you need to include the group name at the beginning (note the group name can be found in the admin section for your node type, it will be somehting like 'group_example'. The reference then becomes [GROUP_NAME][FIELD_NAME][0][url], [GROUP_NAME][FIELD_NAME][0][title], etc.

So this was my scenario that I got to work, and I hope it helps you:
I have a "resource" node-type, one of its fields is a CCK link field, I named "resource_url" whick CCK named "field_resource_url" This field is in a group with a few other fields. The name of the group is "group_resource_information" To get the URL to prepopulate with "http://www.example.com/" I used "?edit[group_resource_information][field_resource_url][0][url]=http://www.example.com/"

amanire’s picture

Priority: Normal » Minor
Status: Active » Closed (works as designed)

Thanks, this is helpful. I guess this shouldn't be listed as a bug.