Module Description
The Prepopulate module allows fields in most forms to be pre-populated from the $_REQUEST variable.

Prepopulate is excellent for creating bookmarklets. For examples on usage for all of these cases, please read the USAGE file that comes with the module or you can read the online handbook page.

Drupal 8 The format in D8 has changed. It uses the field/form array structure. This typically means you should use [widget][0][value] as part of the URL for field backed form inputs.

Pre-populate the title field on a node creation form: - http://www.example.com/node/add/page?edit[title][widget][0][value]=simple title

Pre-populate the body field: - http://www.example.com/node/add/page?edit[body][widget][0][value]=hello world

Pre-populate an entity reference field: - http://www.example.com/node/add/page?edit[field_entity_reference][widget][0][target_id]=123

Note: For security reasons, Drupal 8 version of this module does not support radios/checkboxes. This means by default, someone cannot craft a specially formatted URL that automatically adds permissions (checkboxes) or changes admin config options (radios). Nor does it support overwriting any existing values in inputs. The later cannot be turned off. But if you really need radios/checkboxes, implement hook_prepopulate_whitelist_alter to add additional allowed form elements. Use with caution.

Drupal 7 In previous version of Drupal, the following URL example will work:

http://www.example.com/node/add/blog?edit[title]=this is the title It will automatically fill the Title field on a new blog post with the words "this is the title". Any field can be prepopulated this way, including taxonomy and CCK fields. You can prepopulate more than one field at a time as well.

Important Note As of Prepopulate 7.x-2.1 the ability to base64 encode request parameters has been removed. See this security advisory for more information.

Project Usage
8834
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
Prepopulate module solves the issue of pre-populating fields in forms from the $_REQUEST variable, with specific formatting required for Drupal 8 and Drupal 7 versions.
Data Name
prepopulate

OPENAI CHATBOT

OPENAI CHATBOT

15:39:45
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.