diff --git a/README.txt b/README.txt index 34cd45f..8757fc2 100644 --- a/README.txt +++ b/README.txt @@ -17,7 +17,7 @@ syntax like: http://www.example.com/node/add/blog?edit[title]=this is the title&edit[body]=body goes here -Refer to the USAGE.txt file or the online handbook at http://drupal.org/node/228167 for more examples. +Refer to the online handbook at http://drupal.org/node/228167 for more examples. Please report any bugs or feature requests to the Prepopulate issue queue: http://drupal.org/project/issues/prepopulate diff --git a/USAGE.txt b/USAGE.txt deleted file mode 100644 index 02a6e66..0000000 --- a/USAGE.txt +++ /dev/null @@ -1,176 +0,0 @@ - -See README.txt for a description of this module. -See this documentation online at http://drupal.org/node/228167. - -USING PREPOPULATE MODULE -======================== - -Simple Usage ------------- - -Prepopulate the title field on a node creation form: - http://www.example.com/node/add/content?edit[title]=This is the title -With 'non-clean' urls: - http://www.example.com?q=node/add/content&edit[title]=This is the title - - -POST Requests -------------- -Since Prepopulate uses the $_REQUEST variable, you have access to prepopulate -form values from either GET request in the URL, or the form POST requests. In -the below example, we prepopulate a node form's title based on a POST Request: - - -
- Title: - -
- - - -POST Requests -------------- -Since Prepopulate uses the $_REQUEST variable, you have access to prepopulate -form values from either GET request in the URL, or the form POST requests. In -the below example, we prepopulate a node form's title based on a POST Request: - - -
- Title: - -
- - - -How to find what variable to set --------------------------------- - -This can be tricky, but there are a few things to keep in mind that -should help. - -Prepopulate.module is quite simple. It looks through the form, looking -for a variable that matches the name given on the URL, and puts the -value in when it finds a match. Drupal keeps HTML form entities in an -edit[] array structure. All your variables will be contained within the -edit[] array. - -A good starting point is to look at the HTML code of a rendered Drupal -form. Once you find the appropriate (or -tag, use the value of the name attribute in your URL, contained in the -edit array. For example, if the tag looks like this: - - - -then try this URL: - - http://www.example.com/node/add/content?edit[title]=Automatic filled in title - -CCK fields are a bit more complicated: - - - -The key is to put this in the edit[] array nested, like this: - - http://www.example.com/node/add/content?edit[field_office][0][node_name]=AL-235 - -Another example: - -