I am facing this sever problem which i were not aware of inside our sharepoint online site collection/s. Where on some sharepoint online site collections, i have added some custom lists. And inside the custom lists' New and Edit list forms i have added some scripts (using the script editor web part), the script will hide/show some fields based on other fields; values. and everything was working well. here is part of the script inside the list Edit form:-
<script src="/Resources/jquery-1.11.3.js"></script>
<script>$(function() {
$("input[id^='ProjectEstimated_']").attr('disabled', 'disabled');
$("img[id^='ProjectEstimated_']").hide();
$("input[id^='ProjectEstimatedCompletion_']").attr('disabled', 'disabled');
$("img[id^='ProjectEstimatedCompletion_']").hide();;
//code goes here
Today i download the sharepoint mobile app on my iPhone >> i access the sites using the SP app, but i have noted these problems:-
1- the above custom script will not have any effect, so now when editing an item inside SP mobile app >> all the fields will be shown.
2- I have a managed metadata field >> and this field will be shown as read-only inside SP mobile app.
3- Using PnP i have defined to hide some fields inside the New and Edit forms, as follow:-
$fieldTitle = "SiteCreated"
$customfield = $Context.Site.RootWeb.Fields.GetByInternalNameOrTitle($fieldTitle)
$customfield.SetShowInEditForm($true)
$customfield.SetShowInNewForm($false)
$customfield.UpdateAndPushChanges($true)
but those settings will not have any effect, and all the fields will be shown on SP mobile app !!!
4- i have disabled attaching files inside the custom list settings>> but when add/edit items inside SP mobile app users can attach files to the items..
So can anyone adivce how i can have a short term fix, by either:-
1- prevent accessing some site collection (prefereed some lists and libraries) on mobile apps?
2- prevent add or edit items and document on mobile apps, and only allow users to view the items and documents?
any help on this will be highly appreciated.
Thanks