Hi,

I was just wondering if the D7 version is working with cck fields.

Trying to prepopulate a term from a dropdown list of taxonomy terms and in this case it is field_country

Have tried:

node/add/article?edit[field_country][value]=5

node/add/article?edit[field_country[und]][value]=5

node/add/content?edit[field_country][0][article]=5

Would most appreciate any pointers in the right direction :)

Comments

TXANKETE’s picture

Try this:
node/add/article?edit[country][value]=5

node/add/article?edit[country[und]][value]=5

node/add/content?edit[country][0][article]=5

liliplanet’s picture

thank you so much for your reply TXANKETE, but tried all you mentioned with no results.

field_country is a drop-down list of taxonomy terms and value 5 is for example Belgium

so basically i would like please:

node/add/ .. type is 'article' .. select from taxonomy called 'category' .. 'the value of 5'

'field_country' is the field in my content type.

would so love to make this work :) most appreciate any direction ..

TXANKETE’s picture

Try this:
node/add/article?edit[country][und][value]=5

liliplanet’s picture

StatusFileSize
new27.79 KB
new6.73 KB
new3.9 KB
new6.21 KB
new6.11 KB

Most appreciate your reply, but already tried that in #1 (and unfortunately no joy)

I'm attaching screenshots, maybe that might push us in the right direction :)

Would love to make this work and most thankful for your help.

liliplanet’s picture

Thank you TXANKETE, I do use the full address in my url.

At a loss now and unfortunate that I cannot solve this .. maybe another solution is www.drupal.org/project/multistep to make sure users select the correct category before they continue with the form.

Most appreciate your help :)

adriancotter’s picture

Hey Liliplanet,

One thing you have to make sure is that you are setting the value of the option, not the text (but it looks like you are already doing that).

For instance, this is my SELECT field:

California

On my form it populates correctly, using:
http://url.com/node/add/contenttype?edit[field_states][und]=84

If your select form was similar name="field_country[und]" then this should work:
node/add/article?edit[field_country][und]=5

R.J. Steinert’s picture

R.J. Steinert’s picture

liliplanet’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

rudyard55’s picture

# 7 worked for me too. Thanks adriancotter.