nuecho / rivr

Rivr is a lightweight open-source dialogue engine enabling Java developers to easily create enterprise-grade VoiceXML applications.
http://rivr.nuecho.com
Other
61 stars 23 forks source link

Generating two <form> elements with fillVoiceXmlDocument #13

Closed Rohith2304 closed 3 years ago

Rohith2304 commented 3 years ago

Can we create two separate <form> tags using fillVoiceXmlDocument? if not, is there any other alternative for that?

gawi commented 3 years ago

Yes:

@Override
    protected void fillVoiceXmlDocument(Document document,
                                        Element formElement,
                                        VoiceXmlDialogueContext dialogueContext)
            throws VoiceXmlDocumentRenderingException {

        Element vxmlElement = (Element) formElement.getParentNode();
        Element secondFormElement = appendNewElement(vxmlElement, VoiceXmlDomUtil.FORM_ELEMENT);
        ...

I'm curious. Why do you need 2 forms at all? Unless you are doing something very unusual, you shouldn't not have to do this.

Rohith2304 commented 3 years ago

Thank you so much gawi for your response. It really helped me a lot