This topic is locked
[SOLVED]

 Dropdown Box on Search

12/30/2017 6:49:13 AM
PHPRunner General questions
A
asawyer13 authorDevClub member

I have a Messages table. I want to have the list page have a dropdown search at the top. I have a column in my messages table that has "New", "Read" or "Deleted" in it. I would like the Dropdown to have New,Read,Deleted in it and default to New possible already show the new Messages in the list when the list is originally opened. It would be nice if as the user changes the dropdown that the list would refresh, with Ajax if possible so the screen doesn't refresh. If I need a button that says "update" or "Search" that's okay, but it would be nice if I didn't have to have a button
I try to go thru the manual and forum prior to asking questions, but I'm new to PHPR so I'm sure I will have more questions. I will try not to ask dumb ones, but be assured as I learn more I will ask less, and I will try to help people here once I'm more knowledgeable.
Thanks
I did find this but I would like the dropdown and list to be on the same page.

https://xlinesoft.com/phprunner/docs62/add_dropdown_list_box_with_values_for_search.htm

admin 12/30/2017

The example you posted is specifically designed to display a dropdown with search values on the List page.

A
asawyer13 authorDevClub member 12/30/2017



The example you posted is specifically designed to display a dropdown with search values on the List page.


Okay, I'll look at it again.
Thanks

A
asawyer13 authorDevClub member 12/30/2017



Okay, I'll look at it again.
Thanks


When I put the code in and make the changes and run it, instead of appearing in my list page (messages_list.php), it shows up in my View popup??? but the dropbox is empty.

A
asawyer13 authorDevClub member 12/30/2017



When I put the code in and make the changes and run it, instead of appearing in my list page (messages_list.php), it shows up in my View popup??? but the dropbox is empty.


Looks like maybe it's some small bug with using popups?? Maybe there is a different way to reference it or something.
I don't know how to change [SOLVED] to not solved but the dropdown is not appearing on my messages list page, but it's showing up on my messages view page when I pop it up, right next to the Close button.

A
asawyer13 authorDevClub member 12/30/2017



Looks like maybe it's some small bug with using popups?? Maybe there is a different way to reference it or something.
I don't know how to change [SOLVED] to not solved but the dropdown is not appearing on my messages list page, but it's showing up on my messages view page when I pop it up, right next to the Close button.


Actually it's appearing on my list page, I just missed it, but it's also appearing on my View page. How can I remove it from my View page? The Dropbox is also empty but that might be something I did incorrectly, so I will work on that.

A
asawyer13 authorDevClub member 12/30/2017



Okay, I'll look at it again.
Thanks


I now get my dropdown with the 3 Status values, however when I select them, my list is still showing all records. I'm positive it's something I'm not doing correctly with the code, but I don't know what to change. Right now when I run my app and select "New" in the dropdown, this is the code that has been generated for me, based on the snippet that I have changed.

<option value="messages_list.php?ctlSearchFor=New&amp;srchOptShowStatus=1&amp;ctrlTypeComboStatus=0&amp;srchWinShowStatus=0&amp;a=integrated&amp;id=1&amp;criteria=and&amp;type1=&amp;value11=New&amp;field1=Status&amp;option1=Equals&amp;not1=a=search&amp;value=1">New</option>


I have a column in my table called Status. It has a text value of New, Read or Deleted. What do I need to change above to get it to work? Also I still do need to remove the dropdown from my View page that I'm doing in a popup.
Once those two things are solved, I'm in great shape.
Thanks for any help that anyone has time to help with.