Drop Shadow

Special form options

You can change to bookmarkable form submissions, and you can restrict what appears in foreign key pull-downs.

GET vs. POST form methods

The plug-in assumes that you want to limit submissions to the POST method. This means that form submissions cannot be bookmarked. Often you will want to let your readers bookmark their submissions. If so, use allowGET to switch form submissions to the GET type.

<? $db->allowGET(); ?>

Restricting selections

The plug-in will automatically display foreign keys as a series of choices. If you want to hide some of those choices, you can use a foreign filter to select only those choices you want.

For example, if you have a foreign key called “room”, and you only want to display the rooms where “public” is “yes”, you would use:

$publicRooms = array('public'=>'yes'); $view->foreignFilter('room', $publicRooms);

Or, if you have a category called “secret” through a foreign key called “category” and you want to make it invisible, you could use:

$categoryRestriction = array('title'=>array('operator'=>'not', 'value'=>'secret')); $view->foreignFilter('category', $categoryRestriction);

Direct access to the form

The SQL plug-in uses the Form Verification plug-in behind the scenes to manage forms. You can get direct access to the form object using $view->form or (if it hasn’t been created yet) using $view->getForm().