-
-
Notifications
You must be signed in to change notification settings - Fork 672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jspsych-form #135
Comments
what do you think about doing markdown and having that convert into html? if that is where you are headed there is a nifty little plug in called showdown.js https://github.com/showdownjs/showdown |
I don't think markdown is particularly useful here because the focus would be on form elements and markdown, as far as I know, doesn't have a syntax for creating html forms. |
If the user provides an HTML |
I'm working on something close to this in my experiment template repo as a way of collecting demographic information at the end of a survey. Currently the code is in its own JS file like a plugin, but it still needs cleaned up before it can be pulled since it's still pretty task specific. It has some pre-configured questions like race, gender, education, and age, and these wrap around a generator function that creates the needed form markup. That generator is set up to also be used for custom questions. At the moment it still uses javascript objects passed to functions, but I like the idea of a markdown file. We could wrap it around the low level functions but still expose them to give users an option between friendly-but-rigid and customizable-but-scary. I'd be interested in working on that if anyone has input. Some initial ideas:
|
@chrisbrickhouse , this is great. I think the form-specific extensions to a markdown style is an interesting approach here. It's fairly different from the rest of the plugins. JS objects would fit the style of other plugins a little better. But there is something that's appealing about the speed of markdown syntax. Declaring the appropriate string in JS could be a little annoying, since users will need to worry about white space, indentation, etc. I guess the short version is: I'm open to ideas and experimenting! |
I agree with Josh that markdown is an interesting approach and might be more intuitive and readable, but also that it's pretty different from the style of other jsPsych plugins. var survey_page = {
type: 'survey',
questions: [
{
question_type: 'multi-select',
prompt: "Which of these colors do you like?",
options: ["Red", "Yellow", "Green", "Blue", "Black"],
name: 'Colors'
},
{
question_type: 'text',
prompt: "How old are you?",
rows: 5,
columns: 40,
name: 'age'
}
],
randomize_question_order: true
}; I'm sure lots of plenty of people would be interested in trying out a survey plugin that takes markdown, myself included, and I don't see why we couldn't offer both plugin types. |
See #2265 |
New plugin proposal: jspsych-html-form.
Purpose is to allow experimenter to design an HTML form (either in markup in code or in external file) that is then displayed to subject. Data from the form is recorded, no matter what structure the form takes. Ideally, the process is automatic: User provides the form, jsPsych figures out what data there is and records it. Fallback option would be to require the user to enumerate the form elements that they want to record from.
The text was updated successfully, but these errors were encountered: