Form Visibility Rules - Help | Community
Skip to main content
Level 2
July 31, 2025
Question

Form Visibility Rules - Help

  • July 31, 2025
  • 1 reply
  • 1963 views

Hi there,

 

I have been tasked with creating a form in for a live event. In this case, I am to create some visibility rules that will block certain folks (partners) from being able to register once the threshold has been reached. We still want customers to have the option to register.

 

I've started by adding a field with radio buttons that have the registration type = Customer or Partner, to help bucket the ones we want to eventually close registrations off for. I've added another field that has a "Sorry, but we've exceeded capacity for this event..." with visibility rules to populate for partners. I've been working with AI to figure some of this out. Its giving me custom scripts to put into the HTLM of a rich text field, however they don't seem to be working. I do need to fangle with the code a bit more but I am not a dev so it's a bit complicated to me. I was also thinking I can use rules based on the domain if we have the partners identified for an event, as a 2nd touch point to try and catch all, but there are some instances where we won't have every domain identified.

 

Wondering if anyone has advice for this niche situation? Please note, I do not have admin access so I don't think I can mess with any of the API's (as AI suggested). I have also been told I cannot create any new fields for this exercise. I understand this isn't a fool proof way to capture everyone, as some may simply choose customer, or register with their personal email, so we won't catch their domain. But this will help catch some of the folks. I believe I can still do this with these constraints but am all ears to what anyone else has to say.

 

TLDR: Building an event registration form. Need custom visibility rules to block registration for partners once a threshold has been met, but still want customers to be able to register. 

 

Thanks in advance!

1 reply

SanfordWhiteman
Level 10
July 31, 2025

I've added another field that has a "Sorry, but we've exceeded capacity for this event..." with visibility rules to populate for partners. I've been working with AI to figure some of this out. Its giving me custom scripts to put into the HTLM of a rich text field, however they don't seem to be working.

Not a surprise. 😑

 

The magic lying machine will just make up Marketo features. It’s very good at pretending things are possible.

 


Need custom visibility rules to block registration for partners once a threshold has been met

How are you counting the number of registrants toward that threshold? That seems to be a prerequisite, no?

Level 2
July 31, 2025

Currently trying to use a custom script where I set the threshold and can updated it as needed per the venue size, or other variables.

 

"

<script> $(document).ready(function() { // Simulation of partner count -- replace with a dynamic method if possible 

var partnerCount = 60; // For simulation, set this value as needed

var partnerRegistrationThreshold = 50; // Your threshold

"

But again, it's a lot of dev jargon to me. Assuming I need some sort of JSON for any of this to actually work in a rich text field. I see where I can set the values, but some of this stuff makes zero sense to me and I need to have some knowledge of this instead of just copying and pasting in to make it work. Not sure how the value actually tracks back to the page and the visibility rules in the other fields.  

 

Getting this automated is a nice to have. However, the folks I am trying to get this done for will be monitoring the registration numbers manually anyway and would be able to just give me the go ahead to "block" registration to the partners when the threshold is met. So if there's an each hidden field I can use to do this, or some other way, that will suffice. For now at least. 

SanfordWhiteman
Level 10
July 31, 2025

Currently trying to use a custom script where I set the threshold and can updated it as needed per the venue size, or other variables.

 

<script> $(document).ready(function() { // Simulation of partner count -- replace with a dynamic method if possible 

var partnerCount = 60; // For simulation, set this value as needed

var partnerRegistrationThreshold = 50; // Your threshold

This code has no meaning at all. (Just telling it like it is.)

 

You haven’t directly answered my question, though: how are you counting the people that register? That has to happen for any of this to be possible.

 

Manipulating form field visibility based on the count being over or under a limit (or more generally, based on some number being under or over another number) is the easy part! 

 

Counting the registrations and having the current count be available to read on every pageview has to be in place first. Does that make sense? Surely you aren’t planning to count the registrants manually using a Marketo Smart List, you’d have to be checking it every second.