Score:0

What's the best way to handle an AJAX call to access a web service with webforms?

pg flag

Complete beginner in Drupal so if I should be learning something first, please do tell me. I was thrown into this despite having no Drupal experience so I'm on a crash course.

I'm currently looking to add an ajax call to a number field created through the Webform module. Once filled, the number is going to be calling a web service (SoapClient) to validate the number and prefill some other fields.

My first thought is to just create a php file to do that but I realize that this doesn't adhere to best practice and open a security hole. Where should I look to get started on this task?

id flag
This question is asking for outside documentation so it should perhaps be closed as against the rules.
Score:-1
id flag

Welcome. Drupal has an AJAX API as part of its Form API. You write some code to alter a form, adding the capabilities you want.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.