CMS Development

tmcmillan99
Colaborador | Partner nivel Elite
Colaborador | Partner nivel Elite

Query 2 HubDB columns from one search input?

resolver

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 Me gusta
1 Soluciones aceptada
tmcmillan99
Solución
Colaborador | Partner nivel Elite
Colaborador | Partner nivel Elite

Query 2 HubDB columns from one search input?

resolver

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

Ver la solución en mensaje original publicado

0 Me gusta
5 Respuestas 5
tmcmillan99
Solución
Colaborador | Partner nivel Elite
Colaborador | Partner nivel Elite

Query 2 HubDB columns from one search input?

resolver

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 Me gusta
stefen
Asesor destacado | Partner
Asesor destacado | Partner

Query 2 HubDB columns from one search input?

resolver

@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
Equipo de producto de HubSpot
Equipo de producto de HubSpot

Query 2 HubDB columns from one search input?

resolver

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

0 Me gusta
Kevin-C
Experto reconocido | Partner
Experto reconocido | Partner

Query 2 HubDB columns from one search input?

resolver

Hey @tmcmillan99 

 

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

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

Query 2 HubDB columns from one search input?

resolver

@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