I added hook_prepopulate() to be able to allow other modules to expose some data to prepopulate.
My use case is this: #1222274: Content Type task: Prefill parts of node forms based on variables (or fixed strings) . It does not make sense to re-implement prefill syntax and logic when it's already there, but i'd not put put everything in the URL.

CommentFileSizeAuthor
prepopulate_external_data.patch1.78 KBaron novak

Comments

Anonymous’s picture

This sounds awesome. From the code I can't really tell what it does. How can this be used?

aron novak’s picture

For the end users, this patch would mean absolutely nothing. It's for the developers of other modules. They'd be able to use prepopulate like syntax to prefill forms in various cases. Personally I used it with maestro module.

harryhurry’s picture

Hi Aron,

As I have to prefill a new content type started by Maestro with a maestro variable:
Could you please provide an example how you did this?

I guess, you used both patches,the one for Maestro and the one for prepopulate.

Please let me know.