Title: Button search
Last modified: August 9, 2022

---

# Button search

 *  Resolved [kenusys](https://wordpress.org/support/users/kenusys/)
 * (@kenusys)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fbutton-search%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 27 total)

1 [2](https://wordpress.org/support/topic/button-search/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/button-search/page/2/?output_format=md)

 *  Plugin Author [Passionate Programmer Peter](https://wordpress.org/support/users/peterschulznl/)
 * (@peterschulznl)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/button-search/#post-15899839)
 * Hi [@kenusys](https://wordpress.org/support/users/kenusys/),
 * If you are using the Data Publisher, you can add a search form in front of your
   table. This type of filtering is explained here:
    [https://wpdataaccess.com/docs/data-publisher/search-form/](https://wpdataaccess.com/docs/data-publisher/search-form/)
   This works for Data Projects as well.
 * If you want to access a database table yourself with PHP, you can use the Code
   Manager. Here is a code example:
    [https://code-manager.com/code/?wpda_search_column_code_name=Execute%query%rom%PHP%shortcode](https://code-manager.com/code/?wpda_search_column_code_name=Execute%query%rom%PHP%shortcode)
 * Is this what you are looking for?
 * Thanks,
    Peter
 *  Thread Starter [kenusys](https://wordpress.org/support/users/kenusys/)
 * (@kenusys)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/button-search/#post-15910061)
 * I could not write php code , in the search form i would like put key word using
   maxbutton …. Can you help me , maybe put the something at buttons advanced field
   
   Then it will works
 * Here is our search form [http://www.3gg.kr/movie/](http://www.3gg.kr/movie/)
   
   And
 *  Plugin Author [Passionate Programmer Peter](https://wordpress.org/support/users/peterschulznl/)
 * (@peterschulznl)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/button-search/#post-15910354)
 * Hi [@kenusys](https://wordpress.org/support/users/kenusys/),
 * You are getting a cors error. Please check this image: [https://ibb.co/KLrk5s1](https://ibb.co/KLrk5s1)
 * That errors needs to be fixed first! Can you arrange that?
 * Thanks,
    Peter
 *  Thread Starter [kenusys](https://wordpress.org/support/users/kenusys/)
 * (@kenusys)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/button-search/#post-15916203)
 * Peter ,
    I can not fix this error , even i do not know where error comes. I just
   put button that search form 3gg.kr/movie/ ..
 * I am not familiar code manager i think your search publication page is so good
   enough only i would like put button value to field is it possible ?
 * At button’s advanced feature … but there is not enough documentation …
 * Ken
 *  Thread Starter [kenusys](https://wordpress.org/support/users/kenusys/)
 * (@kenusys)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/button-search/#post-15916809)
 * Peter ,
 * Would you provide javascript which can be run when your push button “java script
   onclick event …. [http://Www.3gg.kr/movie/](http://Www.3gg.kr/movie/) THERE IS
   SF BUTTON , WHICH CAN SORT OUT SF MOVIE AMONG THE WHOLE MOVIE LIST .
 * Ken
 *  Plugin Author [Passionate Programmer Peter](https://wordpress.org/support/users/peterschulznl/)
 * (@peterschulznl)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/button-search/#post-15917354)
 * Hi Ken,
 * The table works for me now! I was on http instead of https. The http link does
   not work, but the https does.
 * Oke, let’s get your search form working. I don’t understand much of what I see
   on page table, but in the html i see there is a column movie_actor. Let’s take
   that one as an example.
 * You need to create a search page first and add a normal html form to it. To search
   on column movie_actor you need to add a text field to your search form with name:
   
   wpda_search_column_movie_actor
 * A text field name needs prefix wpda_search_column_ to make it searchable.
 * Then submit the form to: [https://www.3gg.kr/movie/](https://www.3gg.kr/movie/)
   
   Make sure to use GET. POST does not work (yet).
 * When the user enters the name of an actor and pressed submit, the plugin will
   automatically pick up the value enter for movie_actor. You can add additional
   columns the same way. So to make column movie_director searchable, just add a
   text field to your search form with column name:
    wpda_search_column_movie_director
 * Please note that wildcards (%) do not work with the actual release. This is solved
   in the next update.
 * Does this help?
 * Best regards,
    Peter
 *  Plugin Author [Passionate Programmer Peter](https://wordpress.org/support/users/peterschulznl/)
 * (@peterschulznl)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/button-search/#post-15930655)
 * Hi Ken,
 * Did you get it work? Version 5.2.3 is now available and solves the wildcard issue.
   😉
 * Best regards,
    Peter
 *  Thread Starter [kenusys](https://wordpress.org/support/users/kenusys/)
 * (@kenusys)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/button-search/#post-15930755)
 * Peter ,
 * I could not solved problem . moreover typing text in search form (field??)
    We
   want using small snippet(javascript) to button passed value( genre like drama
   sf ) search form (field) We do not know the id i am not programmer ,,, i copied
   javascript code from internet as following here is
 *     ```
       <form>
       /<input type="text" class="gc-header__search-input" name="s" placeholder="검색어 입력..." id="search" value="" />
   
       <button onclick="myFunction()">sf </button>  
       <script>
         function myFunction() {
           document.getElementById("search").setAttribute("value", "sf");
         }
       </script>
       ```
   
 * can you help me…
 * ken [http://www.3gg.kr](http://www.3gg.kr)
 *  Plugin Author [Passionate Programmer Peter](https://wordpress.org/support/users/peterschulznl/)
 * (@peterschulznl)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/button-search/#post-15931144)
 * Hi Ken,
 * Are you aware of the search panes feature? Here is a demo:
    [https://wpdataaccess.com/search-panes-demo-without-buttons/](https://wpdataaccess.com/search-panes-demo-without-buttons/)
 * This feature allows users to search specific values on mouse click. I need to
   mention that this features requires a premium license. Looks promising to me 
   for your use case.
 * What do you think?
 * Thanks,
    Peter
 *  Thread Starter [kenusys](https://wordpress.org/support/users/kenusys/)
 * (@kenusys)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/button-search/#post-15931246)
 * Peter
    thanks for help us … I implemented search pane before ,, but customer 
   don’t like ,, because Our data is not fitted to search pane… w there is more 
   than 120 lines first one is 1 second one is 1 third one is 1 fourth one is 82
   fifth one is 1 sixth one is 1
 * ….. like this
 * we bought maxbutton plugin , we do not care maxbutton if Java script works,, 
   also maxbutton manual is so so poor ,,, .
 * I want just one snippet (java script ) which can pass value to search field…
   
   your search query is so powerful ,,, customer like
 * if you know java script (function ) … can you help me
 * Ken
 *  Thread Starter [kenusys](https://wordpress.org/support/users/kenusys/)
 * (@kenusys)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/button-search/#post-15931280)
 * another one is reserved word (collapse all , show all , clear all ) can be translated
   to korean word…
 *  Plugin Author [Passionate Programmer Peter](https://wordpress.org/support/users/peterschulznl/)
 * (@peterschulznl)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/button-search/#post-15932117)
 * Hi Ken,
 * If you change the publication language to Korean, labels are translated automatically.
   This feature is documented here:
    [https://wpdataaccess.com/docs/data-publisher/change-publication-language/](https://wpdataaccess.com/docs/data-publisher/change-publication-language/)
 * Regarding the buttons, can you create a few wireframes to explain how the search
   should work? I don’t mind writing some code for you. 😉
 * Thanks,
    Peter
 *  Thread Starter [kenusys](https://wordpress.org/support/users/kenusys/)
 * (@kenusys)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/button-search/#post-15933261)
 * here is wireframe I think there is two way A,B
 * A. snippet not using maxbutton plugin snippet
 * 1) using native HTML , make a button for SF (named and vaule )
    2) if customer
   toggle SF button , then It’s value be passed to search input filed 3) query disㅔㅣ
   묘 the movie only SF genre
 * B. snippet using Maxbutton plugin
    1) We put SF button on the page using Maxbutton
   plugin 2) if customer toggle SF button , then It’s value be passed to search 
   input filed ( Maxbutton has onclick feature for javascript ) 3) query display
   the movie only SF genre
 *  Plugin Author [Passionate Programmer Peter](https://wordpress.org/support/users/peterschulznl/)
 * (@peterschulznl)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/button-search/#post-15933725)
 * Hi Ken,
 * Here is some plain html for a search button. When the button is pressed the user
   is redirected to the page containing your publication shortcode and adds query:
   
   genre=SF
 *     ```
       <form method="get" action="/your-page-containing-the-shortcode/">
       	<input type="hidden" name="wpda_search_column_genre" value="SF"/>
       	<input type="submit" value="SCIENCE FICTION"/>
       </form>
       ```
   
 * To adapt the html to your website:
    – Replace /your-page-containing-the-shortcode/
   with the correct page name – Replace genre with the correct column name – Replace
   SF with the correct column value – Replace SCIENCE FICTION with your preferred
   column label
 * Please let me know if this works for you,
    Peter
 *  Thread Starter [kenusys](https://wordpress.org/support/users/kenusys/)
 * (@kenusys)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/button-search/#post-15933978)
 * Peter, thanks for your great help .. your code dose not ,, looks like I have 
   some error
    instead of button ,, how about using selection list ,, I want return
   value of function favGenre to search field.. Do you think it is possible or it
   is impossible this snippet does not with main body???
 * what is exact step of javascript ??????
 * — Javascript Snippet —
 * <script>
    function favGenre() { var mylist = document.getElementById(“myList”);
   document.getElementById(“favourite”).value = mylist.options[mylist.selectedIndex].
   text; } </script>
 * <b> Select you favourite genre site using dropdown list </b>
    <select id = “myList”
   onchange = “favGenre()” > <option> —Choose Genre — </option> <option> Drama </
   option> <option> sf </option> <option> war </option> <option> romance </option
   > </select> <???? ????>

Viewing 15 replies - 1 through 15 (of 27 total)

1 [2](https://wordpress.org/support/topic/button-search/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/button-search/page/2/?output_format=md)

The topic ‘Button search’ is closed to new replies.

 * ![](https://ps.w.org/wp-data-access/assets/icon-256x256.png?rev=3299063)
 * [WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards](https://wordpress.org/plugins/wp-data-access/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-data-access/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-data-access/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-data-access/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-data-access/reviews/)

 * 27 replies
 * 3 participants
 * Last reply from: [Passionate Programmer Peter](https://wordpress.org/support/users/peterschulznl/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/button-search/page/2/#post-15978190)
 * Status: resolved