Could anybody please help me out? I need to prepopulate a book. My code is something like this:
&edit[book][bid]=123&edit[book][plid]=465&edit[book][weight]=0
This works great for setting the book and the weight, but it doesn't work at all for setting the parent item of the book. Does anybody know how to do this?
Comments
Comment #1
mike_r1977 commentedI just found out how to do this, not using Prepopulate but using the standard Drupal 6 book module. Provided the content type is allowed at: admin/content/book/settings, this syntax:
&parent=465
where 465 id the mlid of the parent page, works great.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #3
Rino-1 commentedAfter changing the & in a ? it worked for me too. Still I would like to know if prepopulate can enter the book settings correctly.
I want to add a "Create" link to my book views but I can not find any way to get the MLID out of a view. [bid] and [weight] are correctly populated but I can not get any data into [plid].
I think that it has to do with the [plid] field not standard available. It appears only after selecting [bid]. probably this function has to be triggered after populating [bid] and [weight]
http://techome.nl/node/add/book?edit[book][bid]=[nid]&edit[book][plid]=[...
[nid] is the nid from the top level book (using "Top level book" reference)
For a child, [nid] is the nid and for a new page on the same level, [nid] is the nid from parent book (using "parent book" reference)
Comment #4
jbrauer commentedPrepopulate cannot set the values of any fields that aren't present at the time the form is built. So a value that is available only after choosing another value won't be able to be set by prepopulate.