| » Metadata | » Status |
|---|---|
|
|
| » Description | |
|
Modify HTML-form adding "value=..." fields to <input> tags according to $_REQUEST, "selected" attribute to <select> etc. A lot of other functions (e.g., select, textarea, img also supported). The simplest example: Clicking the submit button, you see that values of text fields remain unchanged - the same as you entered before submitting the form! The same method also works with SELECTs, CHECKBOXes etc. You do not need to manual write "value=..." or "if (...) echo "selected" in your scripts, it is done automatically based on $_GET and $_POST arrays. Interesting feature (but OPTIONAL - please say if you thing it is NOT NEEDED, I will remove) - handling of "flip-fields". For example, <select name="sel" multiple flip> <option value="first" selected>First</option> <option value="second">Second</option> <option value="third" selected>Third</option> </select> (watch "flip" attribute!) gives the result: $_REQUEST['sel'] === array('first'=>1, 'third'=>1) It is much more logical to work with associative array instead of lists for multiple SELECTs. See example: http://pear.dklab.ru/test/FormPersister/t_formpersister.php /> (I say again: this is NOT required and NOT major (but - useful) option of the module, vote against it if you think it should be removed). |
|
| » Dependencies | » Links |
|
|
| » Timeline | » Changelog |
|
|