• Hi Michael, this plugin is really great. But i facing a problem when i put this coding to my page. Below is my coding for the filter and show table. The table is showed ,but filter is not work. Can i know the solution for my code to show the table with filter? i also test it section by section, i founded the filter is not work.

    <form action=”” method=”POST”>
    Area Covered: <input type=”text” name=”Area Covered ” />
    Student Level: <input type=”text” name=”Student Level To Teach” />
    <input type=”submit” />
    </form>

    [cfdb-table form=”Tutor Registration New” filter=”Area Covered~~/.*$_POST(Area Covered).*/&&Student Level To Teach ~~/.*$_POST(Student Level To Teach).*/” show=”Name,Area Covered,Subject,Tutor Highest Education Level,Student Level To Teach,Remarks”]

    The issue is same, table is showed but no filter work.

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

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

    (@msimpson)

    I would avoid spaces in the name of your input tags.

    If you add to your shortcode
    debug=true

    It shows you some information about how it parses the filter.

    Thread Starter teddybear1980

    (@teddybear1980)

    Michael, Thank you for your reply.

    Can i know the debug=true add to which part of my shortcode?

    Thread Starter teddybear1980

    (@teddybear1980)

    Hi, Michael. My code is :

    <form action=”” method=”POST”/>
    Area Covered: <input name=”Area Covered ” type=”text” />
    Student Level: <input name=”Student Level To Teach” type=”text” />
    <input type=”submit” /></form>

    [cfdb-table form=”Tutor Registration New” filter=”Area Covered~~/.*$_POST(Area Covered).*/&&Student Level To Teach ~~/.*$_POST(Student Level To Teach).*/” debug=”true” show=”Name,Area Covered,Subject,Tutor Highest Education Level,Student Level To Teach,Remarks”]

    This show on my page. I still don’t know how to correct my code. Please advice me, Michael.
    ‘Area Covered~~/.*.*/&&Student Level To Teach ~~/.*.*/’
    Array
    (
    [0] => Array
    (
    [0] => Array
    (
    [0] => Area Covered
    [1] => ~~
    [2] => /.*.*/
    )

    [1] => Array
    (
    [0] => Student Level To Teach
    [1] => ~~
    [2] => /.*.*/
    )

    )

    )

    Plugin Author Michael Simpson

    (@msimpson)

    “Area Covered ” has a space in it

    Thread Starter teddybear1980

    (@teddybear1980)

    Hi, Michael. Below is my code, i think i also missed out something. The result showed also the same no filter work and it show all the data in the table “Name,Area Covered,Subject,Tutor Highest Education Level,Student Level To Teach,Remarks”. The “Area Covered” and ” Student Level To Teach”, i avoid spaces the space and put them as “AreaCovered” and “StudentLevelToTeach”. Please give me advise.

    <form action=”” method=”POST”/>
    Area Covered: <input name=”AreaCovered ” type=”text” />
    Student Level: <input name=”StudentLevelToTeach” type=”text” />
    <input type=”submit” /></form>

    [cfdb-table form=”Tutor Registration New” filter=”AreaCovered~~/.*$_POST(Area Covered).*/&&StudentLevelToTeach~~/.*$_POST(Student Level To Teach).*/” show=”Name,Area Covered,Subject,Tutor Highest Education Level,Student Level To Teach,Remarks”]

    Plugin Author Michael Simpson

    (@msimpson)

    Please start formatting your code with the code button in the post so I can more easily read it.

    You still have an extra space after input AreaCovered.

    If you input name is “StudentLevelToTeach” then in the shortcode you need to match $_POST(StudentLevelToTeach)

    if the name of the field in the database is “Student Level To Teach” then you need to use that exactly.
    Student Level To Teach~~/.*$_POST(StudentLevelToTeach)*./

    Do you see how to you have to make these things match?

    Thread Starter teddybear1980

    (@teddybear1980)

    Thanks, Michael. Below is my code, and the filter successfully run.
    Michael, the data that keyed in by user in ” Area”, there have same sentence, for example: New Blue Condo and Blue Condo is 2 different area, how can i make the filter to differentiate it? If the user keyed in Blue Condo, the New Blue Condo data also show.

    <form action=”” method=”POST”/>
    Area Covered: <input name=”Area” type=”text” />
    Student Level: <input name=”StudentLevel” type=”text” />
    <input type=”submit” /></form>

    [cfdb-table form=”Tutor Registration New” filter=”Area Covered~~/.*$_POST(Area).*/&&Student Level To Teach~~/.*$_POST(StudentLevel).*/” show=”Name,Area Covered,Subject,Tutor Highest Education Level,Student Level To Teach,Remarks”]

    Plugin Author Michael Simpson

    (@msimpson)

    If the user keyed in Blue Condo, the New Blue Condo data also show

    The regular expression syntax
    /.*$_POST(StudentLevel).*/

    specifically the “.*” matches any number of characters before or after the string. Its up to you to write a regular expression to suit your needs.

    Thread Starter teddybear1980

    (@teddybear1980)

    Ok, Thank you Michael.

    Thread Starter teddybear1980

    (@teddybear1980)

    Hi, Michael. My table, The size of “Name” column in my table is too small showing on the website, can i know the way to re-size this column? Any code can provide to me?

    Thread Starter teddybear1980

    (@teddybear1980)

    Hi, Michael. If i want to limit 30 row of data to show every page. How can i make to page 2 or 3 for the others data?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Filter is not work’ is closed to new replies.