This webpage converts csv files used for PsychoPy forms into HTML pages that can be used with my demographics demo.
Paste the contents of the form.csv spreadsheet from Excel. It should be tab delimited. View the source of the resulting page and copy and paste it into a new document, saving it as an html file in your experiment folder.
Radio, choice, check, text, slider, heading and description are recognised. Use , if you need to use a comma within a response option. A text element will be added to the end of a checkbox or radio option with the word "specify"
Use responseColor for headings to alter the outer background colour and responseColor for description to alter the form background colour.
If (itemWidth + responseWidth) > 1, the responses appear indented below the item text. For a matrix table, use radio/horiz with (itemWidth + responseWidth) < 1.
Form data is saved to variables Q1, Q2 etc. To pass this information to PsychoPy use expInfo['Q1'] = psychoJS.experiment._currentTrialData['Q1']; etc. in iframe End Routine.
Start expInfo variables with Leave blank if your index column contains variable names instead of numbers.
For more information please visit this discussion thread.
Reference (APA 7th): Morys-Carter, W.L. (2021, August 12). Form to HTML for Pavlovia. VESPR. https://moryscarter.com/vespr/formtohtml.php.