CMS Development

tmcmillan99
Contributor | Elite Partner
Contributor | Elite Partner

Query 2 HubDB columns from one search input?

SOLVE

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

0 Upvotes
1 Accepted solution
tmcmillan99
Solution
Contributor | Elite Partner
Contributor | Elite Partner

Query 2 HubDB columns from one search input?

SOLVE

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

View solution in original post

0 Upvotes
5 Replies 5
tmcmillan99
Solution
Contributor | Elite Partner
Contributor | Elite Partner

Query 2 HubDB columns from one search input?

SOLVE

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

0 Upvotes
stefen
Key Advisor | Partner
Key Advisor | Partner

Query 2 HubDB columns from one search input?

SOLVE

@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.

Stefen Phelps, Community Champion, Kelp Web Developer
dennisedson
HubSpot Product Team
HubSpot Product Team

Query 2 HubDB columns from one search input?

SOLVE

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

0 Upvotes
Kevin-C
Recognized Expert | Partner
Recognized Expert | Partner

Query 2 HubDB columns from one search input?

SOLVE

Hey @tmcmillan99 

 

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

Kevin Cornett - Sr. Solutions Architect @ BridgeRev
tmcmillan99
Contributor | Elite Partner
Contributor | Elite Partner

Query 2 HubDB columns from one search input?

SOLVE

@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