What is Mapping?

Multiple Forms can be mapped to one table – one table could be mapped to multiple forms.

What is the Concept behind?

Getting data from an meta value structured world like wordpress into a relational table based structure could be very hard.

 

With Wonderful Relations this is very easy. You could create mappings between Formidable Forms and Database Tables. 

 

 

 

Updates in both ways, triggers, ….

Eg. we can have one form that only have user_email and one form with user_email, user_first_name etc…

We can use different forms to update the same data into the tables. The keypart is to put updates back into the formidable form. so we use the trigger functionality that if data gets update in the table we also update the meta fields in formidable.

You can deside which data will be stored into tables

TBD:  Roadmap:

We should create an easy way to log changes (aka revisions) like in every industry project. every change get logged by triggers in a _log table. there we can show the history of data in an easy way. if activated we ned a task to clean this history up eg. every 3 month.

Update by Hook:

If a Formidable Form is saved, updated, duplicated or destroyed the maintain function is called.
Therfore we use the formidable hooks:

  • frm_after_create_entry
  • frm_after_update_entry
  • frm_before_destroy_entry
  • frm_after_duplicate_entry

 

Update by DB Trigger:

The Modul creates, (btw you) when you click the sync table function, create the mysql table triggers. 

  • trg_table_name_before_insert_form_id
  • trg_table_name_insert_form_id
  • trg_table_name_update_form_id
  • trg_table_name_delete_form_id

So when you do changes in the mysql table by query or by code, the changes will be also maintained in the formidable form entries.

Trunc & Rebuild:

In some situation – especially after installation – we what to insert all rows in formidable. 

Therefore we have this function. (Maybe this should be overthaugt and sequencially called when a record is required).

Parameters:

Mapping Table:

  • Project
  • Table

Mapping Columns:

  • Formidable Form
  • Formidable Field
  • Table Column
  • Column Type
  • Is Key