quick_view($value = 'CURRENT', $separator = ': ', $divider = "<br>\n")

Similar to quick_form()Creates a quick form to add or update an object. Works with linked tables as well.

$value can be 'CURRENT', 'POST', or 'GET'. This will print default values based on the current values of the class, or current values of the POST or GET array (e.g. $_POST['person'])

$separator is what goes between the label and the value

$divider is what goes after each form element

return $string

****** NOTE ****** the lookup table hidden values do not work. if anyone has a suggestion for displaying the lookups as an array to be passed through, i'd love to hear it.

Example:

example.php
<?php
include("lib.php");
load("person");

$p = new person;
echo 
"<form method=POST action=example.php>
<table>
 <tr><td>"
;
$p->quick_view('POST'': </td><td>''</td></tr>\n <tr><td>');
echo 
"</td></tr>
</table>
<input type=submit value=Confirm>
</form>"
;

?>

OUTPUTS:

<form method=POST action=example.php>
<table>
 <tr><td valign=top>Name: </td><td valign=top><input type=hidden name="person[name]" id="name" value="Dan" >Dan</td></tr>
 <tr><td valign=top>Address: </td><td valign=top><input type=hidden name="person[address]" id="address" value="1234 Anywhere St" >1234 Anywhere St</td></tr>
 <tr><td valign=top>City: </td><td valign=top><input type=hidden name="person[city]" id="city" value="New York" >New York</td></tr>

 <tr><td valign=top>Zip: </td><td valign=top><input type=hidden name="person[zip]" id="zip" value="12345" >12345</td></tr>
 <tr><td valign=top>Phone: </td><td valign=top><input type=hidden name="person[phone]" id="phone" value="(555) 555-5555" >(555) 555-5555</td></tr>
 <tr><td valign=top>Email: </td><td valign=top><input type=hidden name="person[email]" id="email" value="dan@newyork.com" >dan@newyork.com</td></tr>
 <tr><td valign=top>Age: </td><td valign=top><input type=hidden name="person[age]" id="age" value="30" >30</td></tr>
 <tr><td valign=top>Birthdate: </td><td valign=top><input type=hidden name="person[birthdate]" id="birthdate" value="1978-01-01" >1978-01-01</td></tr>

 <tr><td valign=top>Occupation: </td><td valign=top><input type=hidden name="person[occupation_id]" id="occupation_id" value="5" >Cop</td></tr>
 <tr><td valign=top>Salary: </td><td valign=top><input type=hidden name="person[salary]" id="salary" value="22000" >22000</td></tr>
 <tr><td valign=top>Business: </td><td valign=top><input type=hidden name="person[person_has_business_lookup][]" id="person_has_business_lookup_0 value="1" size=10><input type=hidden name="person[person_has_business_lookup][]" id="person_has_business_lookup_1 value="3" size=10>Networking &nbsp; - &nbsp; Troubleshooting</td></tr>
 <tr><td valign=top></td></tr>
</table>
<input type=submit value=Confirm>
</form>