Hello Team,
I'm looking to enforce mandatory fields in the delivery form to ensure nobody leaves them empty. I've tried using the "required" attribute along with the "leave" tag as suggested in the documentation, but it doesn't seem to be working.
Could you please suggest an alternative approach or guide me on how to properly implement this?
Thanks,
Ankita Vishe
Solved! Go to Solution.
Views
Replies
Total Likes
I've just recently set up a web form which has required fields - I was able to achieve this using:
<input
##all your other normal values here##
required="required"
aria-required="true"
data-nl-ismandatory="true"
/>
Hi @AnkitaV3131 ,
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>
Views
Replies
Total Likes
Hi Partha,
Already tried this but this is not working.
Thanks,
Ankita
Views
Replies
Total Likes
Hello @AnkitaV3131, if your field can be null, maybe it's a null value and you aren't checking it. You should try this check in the leave element.
<check expr="@field != NULL and @field != ''">
Hope this helps!
Views
Replies
Total Likes
This seems logic, have you tried it @AnkitaV3131?
Views
Replies
Total Likes
Hi,
I am trying will let you know once done.
Thanks
Ankita Vishe
Views
Replies
Total Likes
Hi Heku,
This is also not working.
Views
Replies
Total Likes
@AnkitaV3131 , @Share us the script you used in input form for making the field mandatory, and the attribute structure in the schema.
I've just recently set up a web form which has required fields - I was able to achieve this using:
<input
##all your other normal values here##
required="required"
aria-required="true"
data-nl-ismandatory="true"
/>
Hi @AnkitaV3131,
Was the given solution by @ALangridge helpful to resolve your query or do you still need more help here? Do let us know.
Thanks!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies