AnsweredAssumed Answered

POST forms into Web AppBuilder

Question asked by thewabbit on Jun 29, 2015
Latest reply on Jun 29, 2015 by rscheitlin

Hey Guys

I'm using the Dev SDK for Web AppBuilder to build an app. The client would like to submit a form contain a number of locations that need to be routed to. I'm at the point of getting the data from the first website into Web AppBuilder. I decided to go with the POST methods rather than GET to keep the url clean.

 

I made a very basic form (in the root dir of the app):

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Test Post to Webapp</title>
    </head>

    <body >
        <h1>Test Post to Webapp</h1>
        <form id="form" method="post" action="result.html">                    
            <label class="description" for="element_1">CRC 1 </label>
            <input id="element_1" name="element_1" class="element text medium" type="text" maxlength="255" value=""/> 
            </br>
            <label class="description" for="element_2">CRC 2 </label>
            <input id="element_2" name="element_2" class="element text medium" type="text" maxlength="255" value=""/>
            </br>  
            <input id="saveForm" type="submit" name="submit" value="Submit" />
        </form>    
    </body>
</html>

When I hit submit and result.html loads, it displays this error:

Cannot POST /webappbuilder/apps/4/form/result.html

I googled the problem and it seems others have had the issue with Node.js (which i believe I'm right in saying Web AppBuilder uses) but none that I've come across that are Web AppBuilder specific.

 

After some more playing i think it might be down to the Web AppBuilder server not parsing PHP properly? But i'm not 100% sure on this. If anyone is able to assist me with my problem that would be great.

 

Thanks

Outcomes