CMS Development

KGuyCP
Member

Changing the placement of the search box in with HubDB filter and list display

SOLVE

I have a two-part question -

 

First Question: Search Box

Is it possible to move the position of the search box so it appears at the end of your filter, not at the beginning?

 

We would prefer the order to be State, Industry, Search

KGuyCP_0-1626450992148.png

 

Second Question: Hiding the table data until a selection is made

I've done the workaround of creating a fake string query for the URL so nothing displays (I added a "- Select One -" filter to one of my dropdown filters) -  is there a better way? I'

 

I've tried "null" and "blank" with the search box (with those keywords added to my DB)  but it doesn't retain when the link is accessed in another browser window.

 

0 Upvotes
1 Accepted solution
Indra
Solution
Guide | Elite Partner
Guide | Elite Partner

Changing the placement of the search box in with HubDB filter and list display

SOLVE

Hi @KGuyCP,

 

Question 1

You could use css to rearrange the elements within your items. 

For example this can be done with display flex like:

 

flex-container {
    display: flex;
    flex-direction: row;
}
.flex-item:nth-child(1) {
    order: 3;
}
.flex-item:nth-child(2) {
    order: 1;
}
.flex-item:nth-child(3) {
    order: 2;
}

 

Another option is torearrange your html. You will need to change the order of your search field and place it behind the dropdown options.

 

Question 2

You could add a submit button and show data untill it's submitted of display data when a input of select field has been changed.

 

Easiest way if you are using query_dict to filter your rows is to set an if statement like this. You can check out the http request variables 

{% if request.query_dict %}
  Your code
{% endif %}

 


Indra Pinsel - Front-end developer - Bright Digital
Did my answer solve your issue? Help the community by marking it as the solution.

View solution in original post

2 Replies 2
Indra
Solution
Guide | Elite Partner
Guide | Elite Partner

Changing the placement of the search box in with HubDB filter and list display

SOLVE

Hi @KGuyCP,

 

Question 1

You could use css to rearrange the elements within your items. 

For example this can be done with display flex like:

 

flex-container {
    display: flex;
    flex-direction: row;
}
.flex-item:nth-child(1) {
    order: 3;
}
.flex-item:nth-child(2) {
    order: 1;
}
.flex-item:nth-child(3) {
    order: 2;
}

 

Another option is torearrange your html. You will need to change the order of your search field and place it behind the dropdown options.

 

Question 2

You could add a submit button and show data untill it's submitted of display data when a input of select field has been changed.

 

Easiest way if you are using query_dict to filter your rows is to set an if statement like this. You can check out the http request variables 

{% if request.query_dict %}
  Your code
{% endif %}

 


Indra Pinsel - Front-end developer - Bright Digital
Did my answer solve your issue? Help the community by marking it as the solution.
dennisedson
HubSpot Product Team
HubSpot Product Team

Changing the placement of the search box in with HubDB filter and list display

SOLVE

@alyssamwilie , any chance you can help out here?

0 Upvotes