🎬 Trigger actions when a field is empty.
1. Overview
The primary function of this Interaction is to trigger actions if a selected field is empty.
2. Example
In the below example, the function checks whether the linkedEnrolment is empty or not; if it is, it triggers actions.
async function handler(C) {
let actions = [];
let linkedEnrolment = C.getValue("linked-enrolment");
console.log(linkedEnrolment);
if (linkedEnrolment.length === 0) {
}
return C.mergeAll(actions);
}
📌 Need Help?
<style>
.help-container {
display: flex;
margin: 2rem 0 2rem 0;
}
.help-text-button-wrapper {
display: flex;
flex-direction: column;
margin-left: 2rem;
margin-top: 20px;
}
.help-image {
width: 280;
}
.styled {
border: 0;
line-height: 2.5;
padding: 0 20px;
font-size: 1rem;
text-align: center;
color: #fff;
text-shadow: 1px 1px 1px #000;
border-radius: 10px;
background-color: #3979fa;
background-image: linear-gradient(to top left, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2) 30%, rgba(0, 0, 0, 0));
box-shadow: inset 2px 2px 3px rgba(255, 255, 255, 0.6), inset -2px -2px 3px rgba(0, 0, 0, 0.6);
max-width: 200px;
}
.styled:hover {
background-color: #1a63f8;
}
.styled:active {
box-shadow: inset -2px -2px 3px rgba(255, 255, 255, 0.6), inset 2px 2px 3px rgba(0, 0, 0, 0.6);
}
@media only screen and (max-width: 768px) {
.help-container {
flex-direction: column;
}
.help-image {
margin-bottom: 2rem;
}
.help-text-button-wrapper {
margin: 0;
align-items: center;
}
.styled {
margin-top: 2rem;
}
}
</style>
<div class="help-container">
<img class="help-image" src="https://files.readme.io/a456c4a-footer-image.png" width="290" height="140"/>
<div class="help-text-button-wrapper">
<p> If you require assistance or encounter any issues, please don't hesitate to contact us for further support.</p>
<button class="styled" type="button" onclick="window.open('https://clevero.co/contact-support/', '_blank');">
I need support
</button>
</div>
</div>
