I need to pass a form (built using Pear's DB_Dataobject_FormBuilder) a parameter in the URL.

It should take this parameter and use it as a hidden field.

The code below at least gets the value in the displayed html page. But, it does not send that value to the database.

function preGenerateForm() {
$this->fb_preDefElements['plot_ID'] = HTML_QuickForm::createElement('hidden', 'plID', $_REQUEST['plID']);


I do a var_dump in the function preProcessForm(&$values), and it shows:
["plID"]=> string(1) "2"

So I need to somehow get that value to go into the database field - plot_ID

Ok - then I changed it to:

function preGenerateForm() {
$this->fb_preDefElements['plot_ID'] = HTML_QuickForm::createElement('hidden', 'plot_ID', $_REQUEST['i']);

Using that, the plot_ID hidden field name shows in the html page but the value does not.

Then I changed it to:

function preGenerateForm() {
$this->fb_preDefElements['plot_ID'] = HTML_QuickForm::createElement('hidden', 'plot_ID', $_REQUEST['plot_ID']);

and change the URL parameter to plot_ID, it still did not work.

Any ideas?