Creating Surveys Forms
There are two stages to developing a survey for the Marketing Survey Forms system: Page Development and Report Development
This application is based around user created html survey forms. These forms can be authored using any html editing application so long as they conform to a few simple requirements.
1. The basic form page must be called survey.html
2. The form fields must be within a <FORM> tag with the following attributes method="post" action="SubmitForm.aspx" 3. This form must contain the following element: <input type="hidden" name="GUID" value="$GUID" /> 4. There must be a submit button with the following attributes: type="submit"
Options / Recomendations
There are also several optional fields that can be included in the HTML form. Anywhere where $NAME appears in the form it will be replaced with the clients name and anywhere $PRODUCT appears it will be replaced with the product name.
for fields to show up in the database, they need to have the name attribute set to something useful. For example if your question is about How could we improve this form?, your input tag should look something like: <input type="text" name="ImprovementSuggestions" />
In order for the form to show up in the application it must be uploaded to the directory specified in the web.config file, By default this is /templates/. Within this directory a new directory with the name of the survey should be created and the survey files placed within it. For example:
At the time of writing this directory was located at \\van-as2\wwwroot\ATDMarketingSurveyForm\templates .
Reports are generated by stored procedures and output to the user in an Excel readable format. The stored procedures can make use of any of the fields in the MarketingSurveyFormDBLayout tables. For the procedure to show up in the list of reports it should start with the letters "RPT_" and return a result set. The user is prompted to input any of the parameters supplied to the stored procedure before the report is run. An example of a stored procedure is as follows:
CREATE PROCEDURE RPT_Specific_Job @Job_Number nvarchar(255) AS SELECT * from vw_Responses WHERE JobNum = @Job_Number GO