I am assisting on a D8 site being developed and need to come up to speed as my only experience with Drupal is D6. The D6 site has a custom module/form that queries MSSQL data. It's a relatively simple form that only queries and doesn't store any information. The results are returned as a list, with the ability to drill down to details on any given record. I like what I am seeing so far with the webform module and I think it might fit our needs but I could use a little advice/direction as to connecting the form to the db.

  • Webform is all about collecting and storing user submitted data. For data querying (with exposed forms for user filter- and sort-able results),usually the views module is used, not Webforms.
    – Hudri
    Feb 22, 2021 at 15:15
  • Thank you for the feedback. I will look into that option. Just to clarify, I would be able to query an external sql server db using the views module and exposed forms?
    – Rhonda
    Feb 22, 2021 at 18:21
  • Difficult to tell what to advise here. Maybe have a custom route, with a custom controller, in the controller query the data yourself (Drupal comes with a nice API to query database tables) and then build a custom HTML table like drupal.stackexchange.com/q/258362/15055 to output the data?
    – leymannx
    Feb 22, 2021 at 18:45


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.