Using 'Form' widget vs coding a custom form yourself

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2018 01:43 AM
Hello all,
I was wondering how do you cope with pages in the Service Portal that enable users to create new records, such as an incident creation page.
From my understanding, there's two main ways to do this:
- Use the "Form" widget and create a view to define a custom layout for the portal
- Code the form layout yourself using HTML & CSS and handle form logic (such as submission and validation) by writing more code in the Client and Server scripts
I guess that with the first approach it is quicker to set up and easier to maintain, plus you can wrap the out of the box "Form" widget with your own new one that simply sets the options to pass for that Form widget, but you miss the "customization" (in terms of appearence) that you can achieve by handcoding the form yourself.
So by using the first approach you will have the looks of a standard platform form but you don't have to deal with form validation, form submission and manual record creation when the user submits the form...
What are your thoughts about this? Have you done it one way or the other?
Cheers!
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2020 01:09 AM
is it possible to customize the css of the OOB form widget according to our needs ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2020 01:21 AM
If you only need to customize CSS you can do it by adding it in the page or in a custom widget. You must avoid at all costs cloning a SP widget in order to only modify its CSS.
As it's said above, there is a lot of things that can be done by merely modifying CSS and thus no need for cloning, which should be the last resort always as you will lose any updates ServiceNow does in that particular widget you cloned.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2020 01:23 AM
I'm afraid I should not reopen this after this long time, but I'm surprised nobody mentioned Record Producers and using the SC Cat Item widget to display them. It seems like they're falling in oblivion and are less and less used...