APIs & Integrations

Bodocean
Member

Custom Regex for Display Conditions (if x more than/ less than) in Modules

SOLVE

I haven't been able to figure out how to set display conditions in Modules.

I got a project where it displays up to 4 squares. If only 2 squares are selected i want to show the settings for square number one and number two. If i have all 4 squares selected, i would like to display the settings for all of them.

The Radio Button I made to select how many squares are shown have the values 1,2,3,4

Square Setting 1 - if radio button == 1
Square Setting 2 - if radio button >= 2
Square Setting 3 - if radio button >= 3
Square Setting 4 - if radio button >= 4

or does someone know a different workaround for this?

thanks
Thomas

0 Upvotes
1 Accepted solution
Bodocean
Solution
Member

Custom Regex for Display Conditions (if x more than/ less than) in Modules

SOLVE

Hi @Connor_Barley,

My bad. I didn't know how to use Regex. I watched a video on how to do it and what i needed was following Regex: [2-4]
Very simple.

If someone later on is looking at this post and having the same 'issue' - watch this: https://youtu.be/sa-TUpSx1JA

View solution in original post

0 Upvotes
3 Replies 3
cbarley
HubSpot Alumni
HubSpot Alumni

Custom Regex for Display Conditions (if x more than/ less than) in Modules

SOLVE

Hey @Thomas_Bodocean, thanks for linking that video! I'll have to give that a watch myself :smile:

0 Upvotes
Bodocean
Solution
Member

Custom Regex for Display Conditions (if x more than/ less than) in Modules

SOLVE

Hi @Connor_Barley,

My bad. I didn't know how to use Regex. I watched a video on how to do it and what i needed was following Regex: [2-4]
Very simple.

If someone later on is looking at this post and having the same 'issue' - watch this: https://youtu.be/sa-TUpSx1JA

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Custom Regex for Display Conditions (if x more than/ less than) in Modules

SOLVE

Hi @Thomas_Bodocean, it looks like you don't have valid RegEx in that field. RegEx takes sequences of code and finds a pattern- more info here. It's possible you could use a repeater field to loop through your squares, or use a boolean or choice field to toggle your settings for each card. Can you please link the custom module here that you're currently working on, and also provide more info on what you mean when you say that you want to "show the settings" for the squares? This would help immensely with troubleshooting this issue.

0 Upvotes