-
Notifications
You must be signed in to change notification settings - Fork 18
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
Ietestform - Suggestion: check for 'other' text field #117
Comments
Good suggestion! A few thoughts on how to implement.
I think it is not too difficult to implement a test for if specify other exist, once we have comprehensively laid out the case how that field can appear. The most difficult part to code is to test if it is coded correctly, as there could be different styles, multiple conditions (e.g. only ask for specify other if two conditions apply) etc. That part I think is more difficult to implement. Unless we give a warning for all cases that is not coded like the most simple case, and then the user has to ignore the false positives. |
Instead of testing on a string, I would test on a unique value assigned to all 'other' option choices. For example, the surveys I program always have -9 for 'other', -8: don't know, -7: refuse, etc... So in this case the test for whether the text specify other field exists could then be for whether the relevance expression exists in any text field for this value. This would require the survey to have a unique value for 'other' choices, and this value to be defined in the ietestform command by the user. So my idea would be that if a select_one or _multiple has 'othervalue' as a potential choice, then a text field would have either As you mention, it will be difficult to account for all situations, so therefore best probably to flag as warnings for incorrect cases. Perhaps output like this would be informative:
|
Check that there is an associated text field whenever 'other' is listed as a choice in a select_one or _multiple fields. Generate warning if text field doesn't exist or relevance isn't coded correctly.
I suppose this would need users to define a standard value that 'other, specify' is coded as in the input to running iefieldkit.
The text was updated successfully, but these errors were encountered: