Aus SubmersWiki

Wechseln zu: Navigation, Suche

You have several ways of creating a form with preloaded data:
1.1 Specify a default value for whatever fields you want to have a value for in the form.
1.2 Specify a "preload" page for the "free text" input, which will preload the free text field with the contents of that page.
1.3 Add 'preload=preload-page-name' to the 'query string=' value in the 'forminput' call; this will preload the entire form with the contents of that page.
2.1 Add a "preload=..." value to the query string for a 'FormStart' or 'FormEdit' URL.
2.2 Add "template-name[field-name]=field-value" to the 'query_string' value in the 'forminput' call, to set the value for a specific field.
2.3 To preload values for more than one field use "&": "template-name[field-name-1]=field-value-1&template-name[field-name-2]=field-value-2"
3 Add a value for a specific field to the URL query string for FormStart or FormEdit.
4 Create your own custom handling, using the 'sfEditFormPreloadText' hook. If another extension calls this hook, it can preload data however it wants. The function registered with this hook should have a header like "function-name(&$page_contents, $page_title, $form_title)".



Copyright © 2009 Ontoprise GmbH.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the article "GNU Free Documentation License".


Diese Seite wurde zuletzt am 25. November 2010 um 16:01 Uhr geändert.Diese Seite wurde bisher 1.880-mal abgerufen.