• Resolved Jasi_au

    (@jasi_au)


    Hi there,

    Just wondering if the columns in the Form DB plugin table can be moved around to display in a different position. For example, in my contact form I have an email field, title field, name field and surname field in that order which then show up (in that order) as columns in the Form DB plugin table. I would prefer however to have the title field column show first, then the name field, surname field and email field as the last column. Can the column order be changed in the Form DB plugin table without having to change my contact forms, as I have many of them?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    It can’t be changed in the Admin page, but the order can be set in a shortcode using “show”

    Thread Starter Jasi_au

    (@jasi_au)

    Hi Michael,

    Thanks for your reply. Just one other question. When setting the shortcode and using “show” can this then be exported as an excel sheet in the order set with the shortcode?

    Plugin Author Michael Simpson

    (@msimpson)

    Yes, you can create an export link with the same options as shootcodes

    Thread Starter Jasi_au

    (@jasi_au)

    Thank you for that. Will look into it further.

    Thread Starter Jasi_au

    (@jasi_au)

    Hi again Michael,

    The shortcodes are working well however I seem to be having difficulty for the columns to be sorted using the ‘orderby’ shortcode for export to an excel sheet. The columns seem to default to the original form column layout which I’m trying to avoid. This is the code I’m currently using [cfdb-export-link form=”Enfold” enc=”xlsx” orderby=”Submitted,2_1,3_1,4_1,5_1,6_1,7_1,8_1,1_1,9_1″] with the orderby values being the column headers in my form. Any ideas what I might be doing wrong?

    Plugin Author Michael Simpson

    (@msimpson)

    The orderby option orders the rows bases on their values in the columns you name.

    List the columns in the order you want in “show”, I.e. Just change orderby to show in your shortcode.

    Thread Starter Jasi_au

    (@jasi_au)

    Thanks Michael that’s working perfectly now.

    Thread Starter Jasi_au

    (@jasi_au)

    Just one more thing Michael,

    I’ve added the shortcode element ‘headers’ but it doesn’t seem to be working (please see the code below). Have I overlooked something here?

    [cfdb-export-link form=”Enfold” enc=”xlsx” headers=”2_1=Title,3_1=Surname,4_1=First Name,5_1=Address,6_1=Suburb,7_1=State,8_1=Postcode,1_1=Email,9_1=Phone,subject_1=Tour Name” show=”Submitted,2_1,3_1,4_1,5_1,6_1,7_1,8_1,1_1,9_1″]

    Plugin Author Michael Simpson

    (@msimpson)

    What do you mean by not working? What happens?

    Make sure there are no line breaks inside the shortcode.

    Thread Starter Jasi_au

    (@jasi_au)

    Sorry Michael I should have explained myself better.

    The headers in the table remain the same even though I’ve used the headers element to map new names e.g. I renamed 2_1 to Title but it doesn’t change in my table as Title. it still shows up as 2_1. Below is the code that I’m using.

    [cfdb-table form=”Enfold” headers=”2_1=Title, 3_1=Surname,4_1=FirstName,5_1=Address,6_1=Suburb,7_1=State,8_1=Postcode,1_1=Email,9_1=Phone,subject_1=TourName” show=”Submitted,2_1,3_1,4_1,5_1,6_1,7_1,8_1,1_1,9_1″]

    When I try it to add the headers element to the export link shortcode the link doesn’t show up. I guess the question in this instance is if the ‘headers’ element can be applied to excel sheets on export? Below is the code:

    [cfdb-export-link form=”Enfold” enc=”xlsx” show=”Submitted,2_1,3_1,4_1,5_1,6_1,7_1,8_1,1_1,9_1″ headers=”2_1=Title, 3_1=Surname,4_1=FirstName,5_1=Address,6_1=Suburb,7_1=State,8_1=Postcode,1_1=Email,9_1=Phone,subject_1=TourName”]

    I did notice a <b></b> tag and deleted it out but it still doesn’t seem to work. Would you have any ideas as to what I could be doing wrong or what can and can’t be used in the shortcodes?

    Plugin Author Michael Simpson

    (@msimpson)

    I made my own example and it works OK. Your shortcode can get messed up if you have the wrong kind of quotes or you have line breaks.

    Switch you post editor to Text mode instead of visual, then copy and paste from below and preview the post:

    
    [cfdb-export-link form="Enfold" show="Submitted,2_1,3_1,4_1,5_1,6_1,7_1,8_1,1_1,9_1" headers="2_1=Title,3_1=Surname,4_1=First Name,5_1=Address,6_1=Suburb,7_1=State,8_1=Postcode,1_1=Email,9_1=Phone,subject_1=Tour Name"]
    
    Thread Starter Jasi_au

    (@jasi_au)

    Hi Michael,

    I got it working now. It was the wrong kind of quotes causing the issue. Everything works perfectly so thank you very much for that.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Can columns be moved to display in a different position in the Form DB Extension’ is closed to new replies.