How to fill out forms with external api data

Hi everybody.

I work on a university where each student has a unique number, called RA. I also have a form with RA, name and email fields. But I want to when the student give his RA, fill name a email via API (I already have this function working inside form’s class).

How can I put this values inside a form field?

Below, my code resumed:

class AlunoForm(FormAction):

    def name(self):
        return "aluno_form"
    def required_slots(tracker):

        return ["ra", "nome", "email"]
    def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
        return {

            "ra": [

    def buscarDadosAluno(self,ra_aluno):
        ---API function omited---

        return raf,nomef,emailf

    def submit(
        dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any],
    ) -> List[Dict]:

        dispatcher.utter_message("Obrigado pelas informações")
        return []

when validate the RA ,in validate_ra function, you can return {"ra": xxx, "nome": xxx}, or in extract_ra function, extract other slots, when get ra's value.

It works. Thanks!