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.
Michael, Thank you for your reply.
Can i know the debug=true add to which part of my shortcode?
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] => /.*.*/
)
)
)
“Area Covered ” has a space in it
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”]
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?
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”]
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.
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?
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?