- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2023 01:56 AM
Hi All,
I have a custom widget inside which I use a sn-record-picker reference field on a custom form as shown below
HTML
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label for="firstname"><b>User Name</b></label>
<sn-record-picker id="firstname" field="c.addUsr.firstname"
table="'sys_user'"
default-query="data.existUserid"
display-field="'name'"
display-fields="'email'"
value-field="'sys_id'"
search-fields="'name,email'"
page-size="100"
>
</sn-record-picker>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label for="email"><b>Email</b></label>
<input type="text" placeholder="Enter Email" class="form-control" name="email" disabled required ng-model="c.addUsr.email1">
</div>
</div>
</div>
How to set the sn-record-picker field mandatory?
Please help.
TIA
@Ankur Bawiskar @BharathChintala @Allen Andreas @priyasunku @SatyakiBose
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2023 02:15 AM
can you please try this
<span style="padding-right: .25em" title="Mandatory" class="fa fa-asterisk mandatory" ng-class="{'mandatory-filled': data.user.value != ''}"></span>
If my answer solved your issue, please mark my answer as ✅Correct & 👍Helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2023 08:34 AM
Hi @DPrasna ,
I can see that you have accept the solution. if you don't mine, can you give the working code for the example. How to set the mandatory.
It will be very helpful for me. if you give the code snippet.
Regards,
Manthira Moorthi R