๐งฉ Making Slate Form Help Text Dynamic Based on an Earlier Selection
Sometimes the instructions on a Slate form should change based on something the applicant already selected.
A few common examples:
-
Entry term
-
Student type
-
Academic program
-
Campus
-
Residency
-
Applicant classification
You could build multiple versions of the form, duplicate form sections, or use JavaScript to rewrite the page after it loads.
For simple instructional text, though, there is usually a much easier option: use Liquid logic directly inside the form content.
The Scenario
Imagine your form contains an Entry Term field earlier on the page.
Later in the form, you have a section about test scores.
The instructions for that section are different depending on the applicant's selected entry term.
For example:
-
Applicants for one term should submit test scores by one deadline.
-
Applicants for another term have different instructions.
-
Future terms may need a generic message until their requirements are finalized.
Instead of building separate form sections, you can conditionally render the help text.
The Basic Pattern
A simple conditional looks like this:
{% if {{sys:app:app_entry_term}} == 'VALUE_1' %}
Instructions for the first entry term.
{% elsif {{sys:app:app_entry_term}} == 'VALUE_2' %}
Instructions for the second entry term.
{% else %}
General instructions.
{% endif %}
The logic is straightforward:
-
Slate checks the value of the earlier field.
-
It compares that value against the conditions you define.
-
Only the matching content is displayed.
This gives you one form with multiple possible sets of instructions.
Using the Logic Inside Help Text
The same pattern can be placed directly inside the help content for a form field.
For example:
<p>
<k>help</k>
<v>
{% if {{sys:app:app_entry_term}} == 'VALUE_1' %}
Please submit your official test scores by the deadline associated with this entry term.
{% elsif {{sys:app:app_entry_term}} == 'VALUE_2' %}
Test scores are optional for applicants entering during this term.
{% else %}
Review the testing requirements for your selected entry term.
{% endif %}
</v>
</p>
The applicant sees only the message that applies to their record.
Use the Stored Value, Not Necessarily the Display Label
One of the most important parts of this setup is understanding what value Slate is actually returning.
A field might display:
Fall 2027
to the applicant while Slate internally references something closer to:
6dfae06e-5f97-4fc4-9753-8242e05cd18b
Depending on how the field and prompts are configured, the value available to your Liquid condition may be an internal identifier rather than the visible prompt label.
That means this may not work:
{% if {{sys:app:app_entry_term}} == 'Fall 2027' %}
while this does:
{% if {{sys:app:app_entry_term}} == '6dfae06e-5f97-4fc4-9753-8242e05cd18b' %}
The specific value will vary by field and configuration, so confirm what Slate is actually providing before building the condition.
Why Internal Values Can Be Better
Using the underlying identifier also makes the logic less dependent on the wording of the prompt.
Suppose someone later changes:
Fall 2027
to:
Fall 2027 Entry
If your logic relies on the visible text, that change could break the condition.
If the underlying prompt remains the same, logic based on its identifier can continue working without modification.
Always Consider a Default
Even if you only have two valid options today, adding an {% else %} condition is usually a good idea.
For example:
{% if {{sys:app:app_entry_term}} == 'VALUE_1' %}
Term one instructions.
{% elsif {{sys:app:app_entry_term}} == 'VALUE_2' %}
Term two instructions.
{% else %}
Please review the requirements associated with your selected entry term.
{% endif %}
This gives you a fallback when:
-
A new prompt is added later.
-
The field is blank.
-
A new entry term is introduced.
-
The applicant reaches the section in an unexpected state.
-
Someone modifies the form configuration without updating your Liquid logic.
Without a default, the applicant may simply see nothing.
Why Not Use JavaScript?
You could accomplish the same thing with JavaScript.
For example:
if (selectedTerm === "VALUE_1") {
// Show one message.
} else {
// Show another message.
}
But if all you need to do is conditionally render text based on data Slate already knows, JavaScript adds unnecessary complexity.
Using Liquid instead means:
-
The correct content is rendered by Slate.
-
There is no visible text swap after the page loads.
-
You have less JavaScript to maintain.
-
The logic stays close to the content it controls.
-
You reduce the chance of timing or DOM-selection issues.
JavaScript is better reserved for situations where the page genuinely needs client-side interaction.
Keep the Logic Narrow
It is tempting to turn one conditional into a large rules engine.
For example:
{% if term == 'A' and student_type == 'B' and program == 'C' %}
That can work, but complexity grows quickly.
For simple content variations, Liquid is excellent.
If you find yourself maintaining dozens of branches with overlapping conditions, it may be time to reconsider whether the logic belongs somewhere else in Slate.
A good rule of thumb:
Use Liquid to control presentation. Use Slate configuration and data structures to control business logic.
Test More Than the Happy Path
Before publishing the form, test:
-
Every value included in your condition.
-
A record where the source field is blank.
-
A new or unexpected prompt if one exists.
-
Existing applicants with older data.
-
Whether the form updates as expected after the earlier field changes.
That last point is especially important.
Depending on how the form is configured, changing a field earlier in the form may not immediately cause server-rendered Liquid content farther down the page to refresh.
If you need the message to update instantly while the applicant changes selections on the same page, that becomes a different problem and may require client-side behavior.
Example: Entry-Term-Specific Instructions
A real implementation might look conceptually like this:
{% if {{sys:app:app_entry_term}} == 'TERM_GUID_A' %}
Applicants entering in this term should submit all required testing materials by the published deadline.
{% elsif {{sys:app:app_entry_term}} == 'TERM_GUID_B' %}
Applicants entering in this term may review the updated testing policy before submitting scores.
{% else %}
Please review the testing requirements associated with your selected entry term.
{% endif %}
This keeps the content in one location while still giving each applicant the appropriate instructions.
When This Pattern Works Well
This approach is especially useful for:
-
Term-specific instructions
-
Program-specific messaging
-
Domestic versus international guidance
-
First-year versus transfer instructions
-
Campus-specific requirements
-
Conditional document guidance
-
Testing policy differences
-
Application type messaging
Whenever the question is:
"Slate already knows this value. Can I use it to change the instructions?"
Liquid is often the easiest place to start.
Takeaway
You do not need separate forms just because different applicants need different instructions.
When Slate already has the data you need, use conditional Liquid logic to render the appropriate help text.
Keep the logic simple, compare against the value Slate actually stores, include a reasonable fallback, and let Slate handle the presentation before reaching for JavaScript.
No comments to display
No comments to display