Clear sn record picker on load
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2024 12:12 PM
Hi,
I have a HTML which has a link to open a modal that has a sn record picket. When I select the picker and close the modal , an reopen again, the old value is still retained...How do I clear hte value on load of the modal?
<a id="myLink" class="child-flex" data-toggle="modal" data-target="#accesscatalog">
<div class="home-btn-wrap-atf btn-primary">
<div><img alt="Request Accessories" class="icon-width" src="Icon-Request-a-Service-white.png"></div>
<span class="hero-icon" role="button">Request Items</span>
</div>
</a>
<div class="modal fade" id="accesscatalog" tabindex="-1" role="dialog" aria-labelledby="accesscatalog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-header-left">
<h2 class="modal-title" id="accesscatalog" color="black">Request Items</h2>
</div>
<div>
<button type="button" class="btn-default" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
</div>
<div class="form">
<div class="label">Requested by</div>
<div class="label">Requested for</div>
<sn-record-picker class="selector" id="requested-for"
field="c.requestedFor"
table="'sys_user'"
display-field="c.data.reqForDispCol"
display-fields="c.data.reqForDispCols"
value-field="'sys_id'"
search-fields="'name,email'"
default-query="c.data.reqForQuery"
page-size="50"
options="{allowClear : false}"
id='snRecordPickerID'
>
</sn-record-picker>
</div>
0 REPLIES 0