Make all fields read-only in custom widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2023 04:42 PM
I have created a custom widget with some fields, and this widget have fields which are filled. I want to make all fields as read-only. Only cancel button is available which will cancel the record in backend if clicked.
How can I make all fields read-only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2023 09:08 PM
Hi @Hafsa1 ,
Hope you are doing well.
You can use ng-readonly angular directive. Just set its value to true in server side script
eg-
<input type = "text" ng-readonly = "data.setreadOnly" >
Server Side -
data.setreadOnly = true;
Please mark this response as correct or helpful if it assisted you with your question.
Regards,
Harshal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2023 02:27 AM
it's not working, updated service script too
<input class="form-control" type="text" maxlength="100" ng-readonly = "data.setreadOnly" ng-model="data.new_job_title"/>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2023 05:12 AM
Hi @Hafsa1 ,
I have tried below code in my PDI and it seems working
Could you please share your server side script ?
Please mark this response as correct or helpful if it assisted you with your question.
Regards,
Harshal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2023 03:42 PM
there are many custom fields 50+, is there any shorcuts?