Hierarchy

  • FormPowers

Index

Methods

Static getTagFormResponse

  • Gets the user's submitted form information from the current event. Works for forms submitted outside of threaded conversations.

    example

    A simple example of getting the form response and using its properties.

    // Ensure you import the Form powers and types
    import { FormResponse, FormPowers } from '@andi/powers';
    
    function getUserResponses(skillContext: ISkillContext) {
        const applicationEvent = skillContext.event as IApplicationEvent;
    
        if(applicationEvent.applicationEventName === "form-submitted") {
             const formResponse: FormResponse = FormPowers.getFormResponse();
             const firstResponse = formResponse.responses.firstResponse;
             const secondResponse = formResponse.responses.secondResponse;
    
             const formId = formResponse.metadata.id;
        }
    }

    Returns FormResponse

Generated using TypeDoc