Query 2 HubDB columns from one search input?

Is it possible to have a queryparam for 2 HubDB columns from one search input?

I haven’t found any examples of that scenario in other forum posts showing it’s possible. It appears that I would have to combine the two columns to have the queryparam work correctly. Before I make that change, I wanted to check here first in case it’s possible.

Thanks,

Terry McMillan

Hey @tmcmillan99

Have you looked into joining tables using foreign ID? See this link.

@Kevin-C

I think I am just going to combine the two columns to keep things simple. The part I am struggling with now is getting the queryparam to actually work. I am using the real estate listing example as a model to follow but I must be doing something wrong.

How do I have the submit button trigger the queryparam using the input? Do I need to use javascript/jquery? The real estate example doesn’t show any javascript being needed.

I have been successful in getting the HubDB data to list on the page, however, I need to not have any data listed until a search input is made. And of course, have the queryparam work. This is all new for me so struggling a little bit.

Thanks,

Terry

@stefen , any advice for the intrepid @tmcmillan99 who is on a HubDB mission as of late :grinning_face:

@dennisedson @tmcmillan99 HTML forms by default require an input for each query param key pair. So, you could either use a second hidden input if the value doesn’t need to change, or you’ll want to use javascript to create the two query parameters for you.
I’d recommend looking at this example on MDN to get a better understanding of how form submissions work on the web.

Thanks for the suggestions. I was able to figure out the issue with the queryparam not working…just a typo that I can’t overlooking.

Thanks,

Terry