Use URL Filter In A Text Search Input Query

I have a text search input field that queries from several databases. What I am trying to do is add an input option.

Here are the options:

#1. The user chooses to click an item in a table list on page A that is directed to page B. The details are displayed by the query of page A’s URL?=id inside the input field automatically.

#2. The user can also choose to overwrite the A’s URL?=id inside the input field by manually typing a different ‘filter text’ in the input field.

I’ve got to the part where the ID is ‘carried’ over to page B and a Query Param is set as: id

What steps do I need to take to use the above action or the URL value? How can I dynamically use the input field “search.value” AND the “query.id” from the URL inside the text input field value?

So, I just added the dmx-bind:value=“query.id” inside the input field. Now the query can be activated either way.

Now, after clicking the link on page A, the URL value is then placed in the search field on page B. Now, if necessary, the user can overwrite the value in the input field.

If you can dream it, Wappler can facilitate it!

Hi J.R.,

I’m not quite sure what you are trying to do? What do you mean by override it? Can you maybe provide a step by step of what you are trying to do using screenshots?

I worked it out, and it works great.

What I have are two pages, and I used a URL id for a query for the second page form. I placed the query param (query.id) inside a search input field. The input field is used to automatically look up the data from three tables.

Additionally, the input field can also be manually ‘overridden’ or ‘overtyped’ by the user to query another record if necessary.

Hope this makes sense.

Hmmm, interesting. Yes, I see what you are trying to do now. If you were just using the missionary ID number in your input field this would be fairly easy. The idea of being able to search by missionary last name as well really complicates things.

On your A page (assuming this is your B page you are showing) are the user getting to the B page by selecting a record from a results list or directly from the input field? If they are getting there directly from submitting the input on page A you could simply put the same form on the B page.

Adding the name search really complicates things. Not sure how you can work around it. Perhaps filtering your details query by form field value rather than URL parameter?

It works fine, a little better than perfect. Ha!

What did you end up doing to solve it?

Below is page A.

I just added a dmx-bind:value=“query.id” inside the input field.