• Hello,

    I have two sales people and created one form in Contact Form 7 for each of them…2 forms total.

    Some of the fields from both forms I want to share, but some of their client’s info they don’t want/need to share with each other..just with me.

    Using the shortcode, I figured out how to display just the fields/columns that they need access to by using the same field name on both forms for the info that can be shared and different field names for the info that can’t.

    My issue is creating a master display page where I can see everything…for the fields wit the same name, everything appears in one column, but for the private client info where I created different field names on their forms, there are two columns for each.

    My question is…is there a way to display different fields from different forms in the same column for example…I don’t need two columns for the client’s first name…would like to combine both of their inputs into one column.

    sorry if that was a little long…any help would be appreciated.

    TC

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter micha002

    (@micha002)

    Sorry, my original post was hard to follow.

    Is it possible to take fields from two different forms and use the shortcode builder to display the content from both fields in one column.

    For example, I have field called firstname1 in form 1 and another field called firstname2 in form 2 – can I use the shortcode builder to create a table with the content from both of those fields in one column…instead of having two columns displaying firstname1 and firstname2?

    Plugin Author Michael Simpson

    (@msimpson)

    No, the shortcode builder won’t help you merge data from two different forms into the same row. You would have to write code to create a custom transform to re-organize the data.

    Thread Starter micha002

    (@micha002)

    Just to clarify,

    I am not looking to merge data into the same row…each row will only contain data from the same form.

    I want to merge data from two forms into the same column…I can already do this for fields with the same name in different forms – see the “Time” and “Market” columns in the example below. But if the field names are different, it creates two columns – see the columns “FirstName1-fntalent” and “FirstName2-fntalent”

    Table Example

    I tried using /.*fntalent/ to combine the columns without success. See the shortcode below for the above example.

    [cfdb-table form=”Form-1st,Form-2nd” show=”Time,Market,/.*fntalent/” headers=”Time=Time,Market=Time,Market=Market,/.*fntalent/=First Name”]

    Plugin Author Michael Simpson

    (@msimpson)

    OK I get it now.
    “headers” is just going to rename the columns, not combine them.

    Doesn’t work: the closest thing would be:
    trans=”name=concat(FirstName1-fntalent,FirstName2-fntalent)”
    which would work if both forms had those columns, but one column was empty. I played with that and realized it doesn’t work when one of the forms doesn’t have the column at all (vs. value for the column being empty).

    So I think you are stuck having to write custom transform function to do the combination
    https://cfdbplugin.com/?page_id=1076

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Combining Data from different forms into one column/table header’ is closed to new replies.