Change the height of a textarea in Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2017 03:18 AM
Hi guys,
I have a textarea in one of the Service Catalog items in Service Portal that requires increasing the height as the content comes pre-populated and it's lengthy. I have a catalog client script tied to this record producer, which actually determines what content to populate onto this textarea.
I was wondering if there's a way to set a min-height to the textarea rather than hard-wiring the ID of the element, which has a format of 'sp_formfield_IO:xxxxxxxxxxxxxxxxxxxxxxxxxxxx' ?
Any help is massively appreciated.
Regards,
JD
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2017 10:10 PM
hi JD,
have u try configuring the widget instance's CSS?
this will only make css changes to 1 particular widget instance but not all widget.
if u have client script that populate, u can look for textread auto resize using javascript.
html - Textarea Autoheight CSS - Stack Overflow
javascript - Textarea to resize based on content length - Stack Overflow
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2017 03:36 AM
Hi Bryan,
Thanks for your reply.
I have only two instances of SC Catalog Item, which is the widget in question. Not sure if there's an instance for each category item so I can target a specific form as I only see two instances. I decided to target this particular textarea using the wrapping div ID which is not ideal as I'm hard-coding a value of'c6fa024dc12ba900969782d58ed8d7d8' onto the CSS. However this addresses my concern for now
Really do appreciate your help!