FormBuilder linkNewValue issue
| From: | Alessandro Pasotti | Date: | Thu, 19 May 2005 17:41:21 +0000 |
| Subject: | FormBuilder linkNewValue issue | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-19283@lists.php.net to get a copy of this message | ||
Hello,
I have a big problem here:
* I have a FB form with one linkNewValue linked table (PK on linked table
points to FK on main table)
* When there is an error in the main form, the linked new value in sub-form is
inserted correctly in the DB, but the form is displayed again as nothing
would happened in the sub form.
* When I correct the main form and submit it again, FB try to insert the
sub-form
values again and fails because DB constraints check for uniq in the linked
table.
I don't know if this is a bug or I did'nt understand how it works.
Expected behaviour:
there are two possibilities:
1 - kind of rollback on insertion of linked sub-forms when the main form fails
2 - set the sub-form hidden PK to the value of the last inserted row and set
the main form linked field to the same value
Any help would be higly appreciated.
--
Alessandro Pasotti
ICQ# 245871392
Linux User #167502