Hello
I am trying to populate a radio button cck field from a url. Can someone give me a hand to understand the proper url syntax?
The following is the javascript code snippet that I am trying to use:
var url = '/node/add/idea?edit[title]=' + ideaTitle + '&field_ideacategory[value]=' + ideaCategory;
window.location= url;
Comments
Comment #1
gsvitak commentedHello
I figured out the url
node/add/idea?edit[title]=test test&edit[field_ideacategory][value]=Healthcare&edit[taxonomy][tags][3]=healthcare
Comment #2
gsvitak commentedComment #3
alexbk66- commented@gsvitak, can you please provide a bit more info, i.e. which is the radio button field, example HTML.
I can't get 'content taxonomy tree' preselected, see http://drupal.org/node/597610#comment-4315386
Thanks in advance
Comment #4
manuel.adanSame issue here, I have a 4 options radio field, default value is 1 and I try to "prepopulate" for option 3, but it is ignored. This is my query:
and this is my radio field (post-processed by prepopulate):
Comment #5
tezalsec commented+ 1 subscribing
i am having the same problem, prepopulating a value in a 3 option radio field is ignored.
I tried it with both key and label, without success..
Thanks for any help!
Comment #6
crash98 commentedhaving the same problem :( Anybody?
Comment #7
naero commentedI figured this out based on ianchan's reply here: from http://drupal.org/node/883980#comment-3419684
Essentially, the breakdown is:
https://example.com/node/add/story?edit[group_name][field_name][value][ABC]=ABCReplace both "ABC" references with the field's form input value you to use to prepopulate. Took a bit of tinkering for me to figure, but it works. I'll close this issue, but please reopen if you're still having issues. Good luck!