input form mandatory field | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ParthaSarathy

Hi @dishasharma ,

required="true" will make the field's label display in Red color font. But it will still allow empty value.

<leave> tag will make a field mandatory in input form by throwing an error pop-up when the field is empty.

Example,

 

<input label="Internal Name" required="true" xpath="@internalName"/> <leave> <check expr="@internalName !=''"> <error>Internal Name is Mandatory</error> </check> </leave>

 

1 reply

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
February 6, 2024

Hi @dishasharma ,

required="true" will make the field's label display in Red color font. But it will still allow empty value.

<leave> tag will make a field mandatory in input form by throwing an error pop-up when the field is empty.

Example,

 

<input label="Internal Name" required="true" xpath="@internalName"/> <leave> <check expr="@internalName !=''"> <error>Internal Name is Mandatory</error> </check> </leave>

 

 ~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
Level 3
May 10, 2024

I tried this, but its not throwing any error if left empty.

 

Tried all below types

1.

<input colspan="1" label="Template Name" menuId="deliveryMenuBuilder" name="templateName" required="true" type="scriptEdit" xpath="/delivery/content/whatsapp/@templateName"
xpathInsert="/ignored/customizeWABAContent">
<leave>
<check expr="[content/whatsapp/@templateName] !=''">
<error>Template Name is Mandatory</error>
</check>
</leave>
</input>

 

2.

<input colspan="1" label="Template Name" menuId="deliveryMenuBuilder" name="templateName" required="true" type="scriptEdit" xpath="/delivery/content/whatsapp/@templateName"
xpathInsert="/ignored/customizeWABAContent" />

<leave>
<check expr="[content/whatsapp/@templateName] !=''">
<error>Template Name is Mandatory</error>
</check>
</leave>

 

3.

<input colspan="1" label="Template Name" menuId="deliveryMenuBuilder" name="templateName" required="true" type="scriptEdit" xpath="/delivery/content/whatsapp/@templateName"
xpathInsert="/ignored/customizeWABAContent" />
<leave>
<check expr="@templateName !=''">
<error>Template Name is Mandatory</error>
</check>
</leave>

Nothing above worked.