code: public I_CmsFormWidget createFormWidget(
          String key,
          Map<String, String> widgetParams,
          Optional<String> defaultValue) {
  
          if (key == null) {
              key = "";
          }
          I_CmsFormWidgetFactory factory = m_widgetFactories.get(key);
          if (factory == null) {
              // if the given widget type is not found, fall back to text box widget
              factory = m_widgetFactories.get(CmsTextBox.WIDGET_TYPE);
          }
          return factory.createWidget(widgetParams, defaultValue);
  
      }
docs: Creates a new widget based on a type string and widget parameters.<p>
  
  @param key the type string
  @param widgetParams the widget configuration parameters
  
  @return the newly created widget