WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form DB
[resolved] Extra fields added when data is submitted (6 posts)

  1. cgrray
    Member
    Posted 1 year ago #

    I'm using FS Contact form, Contact Form DB and Contact Form to DB Extension Edit. The first time I set up the form and submitted it, all the data showed up in the right place in the database. I changed the table headers to these: Visit Date,Name 1,Name 2,Name 3,Name 4,Country of origin,Other Country,Visit Reason,Other Reason,Phone,Notes. The data were displayed properly on a page using these shortcodes:

    [si-contact-form form='2']
    [cfdb-table form="Visits2" show="Visit Date,Name 1,Name 2,Name 3,Name 4,Country of origin,Other Country,Visit Reason,Other Reason,Phone,Notes"]

    When I submitted a second data set the database had 4 extra columns in it. The Visit Date column was empty and a new column with the visit date was added with the header ex_field1. The text I put in the Name 1 field on the form was in a new column with header ex_field2. The column headed Name 1 was empty. Name 2 and Name 3 columns were empty because I didn't put anything in them. After them are two more columns with the headers ex_field6 and ex_field8, both empty. Then come columns with the headers Name 3,Name 4,Country of origin,Other Country,Visit Reason,Other Reason,Phone,Notes. All empty because I put nothing in them.

    http://wordpress.org/extend/plugins/contact-form-7-to-database-extension/

  2. cgrray
    Member
    Posted 1 year ago #

    The form works fine with just Contact Form DB but when I use DB Extension Edit to edit the field headers the problem above occurs and I paid $50 for the DB Extension Edit plugin. :-(

  3. Michael Simpson
    Member
    Plugin Author

    Posted 1 year ago #

    I want to better understand this. The editor only affects the admin page where you view the database data. It should have no impact on the field names that are saved in the DB. Is there a difference between what you see in the admin panel and what you see using a short code?

    As for the ex_* fields, that is how FSCF names fields. CFDB just saves what it is given. If you change your form definition in FSCF, CFDB will just pick up what FSCF gives it.

    Also: (not sure if this applies to you; kind of hard to follow your explanation) if you have a form with a field called "A" CFDB will save it as "A". If you use the editor to change that column name to "B", it will do so for all the saved entries. BUT when you get a new submission, it will be listed as "A" because that is in the form definition. If you want to rename a field/column, then you must rename it in the FSCF form definition for future entries, and change the column name in the editor for already saved entries.

  4. cgrray
    Member
    Posted 1 year ago #

    Thanks for responding. Looking ast this part of your response; "If you want to rename a field/column, then you must rename it in the FSCF form definition for future entries, and change the column name in the editor for already saved entries." All the fields I'm referring to are Extra Fields. I don't see any place to rename them in the FSCF form definition.

  5. Michael Simpson
    Member
    Plugin Author

    Posted 1 year ago #

    I know you can set the field names in CF7 but I don't know with FSCF if you can change the "ex_field1" names. But in the update I am just putting out today (2.5.1), if you are using [cfdb-table] or [cfdb-datatable] then you can change the names on the table column headers like this:

    [cfdb-table form="Form: 1" headers="ex_field1=First Name,ex_field2=Last Name"]

  6. cgrray
    Member
    Posted 1 year ago #

    I guess it doesn't work with FSCF. Thanks for the update. That will help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.