Use the data stored in your structure (variable, hash element, or element deep in your complex data structure): For radio groups or menus, use the data to determine whether the CHECKED should be set for a radio input (<input type=radio ... CHECKED='checked'>) or whether the SELECTED should be set on the given menu option (<OPTION VALUE="..." SELECTED>) as you are generating the HTML (there should be a way in your templating engine to programmatically determine whether or not the CHECKED or SELECTED apply to the various elements of your form). For INPUT and TEXTAREA and the like, just pass the data from your structure into the VALUE or content of the HTML tag, as appropriate to the given HTML tag (<INPUT ... value="$variable"> or <TEXTAREA>$variable</TEXTAREA>, however your templating engine wants that formatted).
(UPDATE: after "generating", added "the HTML", to clarify my sentence; also, give examples of the INPUT/TEXTAREA)
| [reply] [Watch: Dir/Any] [d/l] [select] |
Select the record from the DB, pass it to your template as a JSON-encoded data structure, use a Javascript framework like Angular to populate the form controls on the HTML page from the JSON data object.
The way forward always starts with a minimal test.
| [reply] [Watch: Dir/Any] |
I cannot post any code. Suffice to say that I have all data from the table from the original analysis.
| [reply] [Watch: Dir/Any] |
I have written a Perl program..
Ok, can you post it ?
poj | [reply] [Watch: Dir/Any] |