Insert to other Table on Submit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 03:47 AM
Use Case:
I have a custom table(u_vendor). In the Form it has Type and Name which is mandatory.
Type is a Choice Field: Vendor or Merchant
I want to save all records having type "Vendor" in the u_vendor table and all records having type "Merchant" in the custom table(u_merchant) onSubmit.
I did achieve saving all the type merchant in the merchant table but it will also be saved in the vendor table.
How to achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 04:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 05:22 AM
just a table form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 04:40 AM
How are your tables configured? If merchant is an extension from vendor, you may have created the issue yourself. Compare it with the cmdb_ci-tables. Any ci created in table cmdb_ci_computer, are also in cmdb_ci_hardware and can even be found under cmdb_ci.
And Sunil is correct in his question: what kind of form are you using for it? Is it a record producer? Because if you are in the backend creating a merchant on the merchant table with type = vendor, it all depends on your script how it works.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 05:23 AM
both tables did not extend from any table.