Required fields in Mechanical Turk

人走茶凉 提交于 2019-12-02 03:29:15

问题


Is there any way to make fields required in an Amazon Mechanical Turk HIT? I get some blank responses to the textboxes or radiobuttons in my HTML form and the Amazon's documentation doesn't seem to provide any mechanism for validation.


回答1:


The easiest way would probably be to use Amazon's API call 'createHIT' to create your HIT: http://docs.amazonwebservices.com/AWSMechTurk/latest/AWSMturkAPI/index.html?ApiReference_CreateHITOperation.html

Then, you can specify your HIT questions using a 'questionForm' data structure, which allows defining any field as 'required', and enforces it when the form is submitted.




回答2:


I would suggest you create your HIT on an external server, used javascript for form validation and then display the questionnaire on Mechanical Turk using an iFrame.




回答3:


I think adding the required attribute to your element works fine.

<input class="form-control" id="url" name="url" placeholder="Enter URL here" required="" type="url" />



回答4:


If you don't mind creating an external web app to host your question form, you can create an external HIT and do your validation there.



来源:https://stackoverflow.com/questions/4091059/required-fields-in-mechanical-turk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!