Button search
-
I would like to make a button for execution of sql ,,, for example. Button named “ drama “. Then after click button then , query the table which contain drama in specific column ..
The page I need help with: [log in to see the link]
-
Hi Ken,
Yu can use javascript, but you still need a form to submit your data or jump to your table from your javascript function. I slightly changed your javascript function to jump to your table page.
function favGenre() { let mylist = document.getElementById("myList"); window.location.href = "/your-page-containing-the-shortcode/?wpda_search_column_???" + mylist.options[mylist.selectedIndex].text; }You need to make sure that you jump to the correct page and add the correct column name. So replace “your-page-containing-the-shortcode” with the page where you have your table and change the ??? in wpda_search_column_??? with the correct column name.
Does this work?
PeterPeter ,
Thanks so much your effort to help , but there is some communication problem
this clear step we want1) 1.a User can select genre on list OR 1.b user can type string (like actor.. movie name year whatever … ) on blank field
2) in 1.a case , selected value been passed to field ( echo on field whatever ?? )
NOT call server query yet3) user take action , Ie strike enter keyboard ,,, finally call server query with value of field which is passed from list or user typed string ( it could be actor name or movie name or genre whatever )
So passing selected value to field is important …
-
This reply was modified 3 years, 9 months ago by
Steven Stern (sterndata).
Hi Ken,
I definitely agree we have a communication problem! 😂 If we want to solve this issue, we need to have a test page. Can you make your code available on a test page so I can see what you have and what’s going wrong? Maybe we can find a solution from there…?
Thanks,
PeterHi , peter
We are waiting your sample code … is it possible or not
We have close this asapKen
Hi Ken,
I was waiting for your test page… 😉
A working demo of a search form can be found here:
https://wpdataaccess.com/publication-search-form-demo/But I understood from your posts you didn’t get it to work. So my suggestion to you was to make your test page available so we can have a look at your test page together and hopefully find a solution…
Can you make your test page available and send me the url? You can use the contact form on the plugin website if you prefer to send it in private.
Thanks,
PeterPeter ,,
can you help me ,, or not ?, I informed admin account and test page.
-
This reply was modified 3 years, 9 months ago by
Steven Stern (sterndata).
Moderator note:
@kenusys Please do not “sign” your messages with a link. That’s spam.
Hi Ken,
Yes, I can help! Absolutely, but I need your input.
This is what I need from you:
(1) Setup a test page on a public URL which shows what’s going wrong
(2) Send me the URL of the test pagePlease use the contact form on the plugin website to communicate the URL in private:
https://wpdataaccess.com/contactform/Thanks,
PeterPeter ,,
NICE NICE IT WORKS ,,, GREAT ,, GREAT …THANKS SO MUCH
KEN
p.s WHAT IS YOUR MAIN CONTACT URL FOR TECHINAL QUESTION ???Great we finally solved it Ken! 😉
You can ask for support on this forum, post a comment on the plugin website or use the contact form on the plugin website if you have a more specific or private question. I don’t mind.
Have a great Sunday,
Peterpeter
YOur code works only one time ie after search drama genre then , content can not be refreshed so ,, after selection you can not search by actor after fill up the form ..2) So we just want selected genre has to be passed form and then that time start searching
ie user can select or your can fill up form .. that is user choice. because original form can search some string ,, whatever(column ) in the table …
is it possible ???Ken
Hi Ken,
I see what you mean. You just need to add the method and action to your form. I sent you a mail with the correct form element.
Hope this helps,
Peter -
This reply was modified 3 years, 9 months ago by
The topic ‘Button search’ is closed to new replies.