Home » Database » DB_Table » Bug #7398
Validation against QuickForm parameters not wanted
Details
| Request #7398 | Validation against QuickForm parameters not wanted |
|---|---|
| Submitted | 2006-04-14 16:38 UTC |
| From | pear at mowd dot nl |
| Assigned | wiesemann |
| Status | Closed |
| Package | DB_Table |
| PHP Version | 5.1.0 |
| OS | Mac OS X |
| Roadmaps | (Not assigned) |
Comments
[2006-04-14 16:38 UTC] pear at mowd dot nl
Description:
------------
When validating the columns and its data before an update or insert it will valiate against optional qf_vals (QuickForm) parameters.
I have a select tag for usernames (from another table) which I will populate before making the form. Therefor I was forced to use an empty array in teh definition var $col for these values.
Now will it validate against an empty array so it will always be false.
Can there be an option validate everything except the qf_vals paramaters?
Test script:
---------------
class Bet extends DB_Table
{
var $col = array(
[...]
'user_id' => array(
'type' => 'integer',
'require' => true,
'qf_label' => 'user',
'qf_type' => 'select',
'qf_vals' => array()
),
[...]
var $sql = array(
'nicknames' => array(
'select' => 'id,nickname',
'from' => 'user',
'order' => 'nickname ASC',
'get' => 'assoc'
)
);
}
[...] in index.php
$nicknames = $oBet->select('nicknames');
// populate the values for the select box
$oBet->col['user_id']['qf_vals'] = $nicknames;
$oBet->addFormElements($G_FORM, $cols, 'vrow');
Expected result:
----------------
-
Actual result:
--------------
-
[2006-04-15 14:28 UTC] pear at mowd dot nl
Hi Mark,
You're right! I just dropped the qf_vals and set the select values from my script.
Sorry about the inconvenience and thanx for pointing this out.
- Charlie
[2006-04-15 14:29 UTC] pear at mowd dot nl
I closed this feature request.