search on form
-
thank you Michael Simpson for your plugin
but i’m newbe and confused to earch on my datai have contact form 7 and save data , now need a search box to search on 2 filds together mj1 and mj2 if mj1 and mj2 is exist in any row (AND not OR) display row of that entry.
Tx
https://ww.wp.xz.cn/plugins/contact-form-7-to-database-extension/
-
Have a look at http://cfdbplugin.com/?page_id=680
Michael Sorry i’m newbe and read that post but dont have any success.
please show me example code that i must use..Try the example on the documentation page, but change “fname” to “mj1” and “lname” to “mj2”
i’m not foolish in all my life but i try this code:
<form action="" method="POST"> First Name: <input type="text" name="name" /> Last Name: <input type="text" name="family" /> <input type="submit" /> </form> [cfdb-datatable form="mjform" filter="name~~/.*$_POST(name).*/i&&family~~/.*$_POST(family).*/i"]its my sample page and dont work:
http://www.webamooz.ir/home/mjfor example i dont want show all data in page just two input field for search FAMILY – NAME and if its exist in table show the row .
in the working scenario , my users search ali for NAME and navabi for FAMILY and get the row :
۱۳۹۳-۰۴-۲۶ ۱۵:۲۶:۲۷ P ali navabi 09123332387 admin 213.207.229.95I looked at your page and I see a problem. When the form is submitted, it appears that the same page is not processing the submission. Let us forget about the short code for a moment. If you put a form on your page with action=”” then that form submits back to the same page. If I click on the submit button on your form, I should see the same page again with the same form. But I do no see the form. The page has the same URL, as I expect. But it looks like a different page is being displayed. The form is not displayed and the short code is never processed.
I don’t know what causes this behavior. Perhaps it is the WordPress configuration or the WordPress theme.
Michael
thank you i’m solved that problem,its WordPress reserved parameter like name – family and … i change my parameters and its look like working:http://www.webamooz.ir/home/mj
but my problem is i need to show results if all two parameters FIRST-NAME and LAST-NAME exist in One row, (AND not OR) .
is there any way?The && in the filter expression makes the constraint and AND. However if you leave one of the fields blank, the regular expression effectively accepts any value for that field.
I set up this example for you to see. Try entering Your-Name “Michael Simpson” and Your Subject = “None”. You get 2 rows where both fields match.
http://blog3.michael-simpson.com/?p=313I put a second short code using == instead of a regular expression (~~) for comparison.
thank you Michael
i don’t have permission to see your site data but my problem now fixed and work Perfect .
thank for your plugin i must read more your documents .:X
Michael
i think i found a permissions bug in plugin,i setup my page :
http://www.webamooz.ir/home/cert/
password: webwebeverything work fine when i logged in with Admin , but i need this search form to anyone , and based on Rule document , i changed Can See Submission when using short codes to Anyone and now when page load all data show to Anyone!
and don’t need to search….Does this help? http://cfdbplugin.com/?page_id=625
i’m confused again.
i need Everyone can search and see data based on last scenario.
but now everyone can see all data without search and the code don’t work perfectly for everyone.
just work with Administrator roll.
what setting i must change to ?
when i setting all to Administrator, everything work for admin and everyone get permission error.
at now i used this for Short code:
[cfdb-table form="StudentsForm" filter="MelliCode=$_POST(MelliCode)&&Cert-Number=$_POST(Cert-Number)"]
and in admin panel set Can See Submission when using short code to Anyone.all seams good for Administrator ,but when refresh page without login(Anyone) i see all data in page 🙁 also search is not work with AND condition but at same time all is work for amdinistrator 🙁
I have examined this. It is definitely a bug since version 2.8. I will release an update soon with a fix.
Thank you Michael
is there any chance to update it in next 2-3 days?
or fix it for me before publicly update?
i run this service for users and announce it 🙁I will update it today.
The topic ‘search on form’ is closed to new replies.