My first delve into winrt/xaml/html5 development, so any general pointers gratefully accepted. I appreciate that this is a very open ended question, basically a thought dump, but all opinions are welcome.
I have been asked to look at developing a questionnaire type application to replace current paper based questionnaires. Application will run on win8 tablet devices which may/maynot have online/wifi access.
The current setup is that the ‘main’ system has the questions stored in the database. A simple spreadsheet style input form where trained operators receive the paper questionnaires and input the data. We aim to eliminate that additional input step and remove the paper.
Basic user requirements are
-
Questions should be updatable as required – so questions must be
stored in a local datastore on the win8 devices – exported from the existing main system database. As the tablet devices may not have online
access it’s fine to recall the tablets for a manual update rather
than pushing out new questions OTA) -
Answers may take the form of YES/NO, Scales (unhappy/moderately
happy/ecstatic…), free text entry. -
Sections should be able to be skipped/branched. So answering YES to
Q2 branches to section 2a, answering NO branches to 2b etc. -
Answers to be stored in local datastore and some method of exporting
provided to get data into main database (wifi cannot be guarenteed,
but all locations will have physical USB connection available to a
desktop running the ‘main’ application where data is to be imported).
As the questions are dynamic the page content and input controls must be generated at runtime – or generated and stored whenever the questions change?
So Q1 may have input type of Checkbox
Q2 may have input type of dropdown list
Q2a may be free text entry.
Answering Q2 may result in skiping to Q5 etc.
All these rules will be stored in the questions DB.
The question prompts and input types will be stored in a local database
Is it possible with XAML to hide and show ‘sections’ – related to the ‘show section 2a or 2b depending on the answer of Q2 etc.
Yes.
You bind the visibility of the section through a converter to the answer of the question:
(I’m using a
StackPanelhere for simplicty)Then your converter needs to look something like this: