-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add 'exclude' column to exclude questions from output #116
Comments
It's an important use case to be able to include questions in your XLS form that you don't want to include in the current survey (or even in the XML). A better route for a new enhancement would be to add a flag to questions that leads them to being ignored by pyxform during the conversion. E.g. a column |
It was added recently here: http://xlsform.org/#question-types The use case you describe would require a new feature, like the column you describe. I support that. |
I like the exclude column idea. @tinok, it might be easier to file a new issue where we can discuss it. Before we document |
Wrt to the existing 'hidden' type (not the exclude functionality described above), I believe the only difference with a calculation is that the hidden type doesn't require a calculation. When I look at the medic mobile comment linked to PR #96, they like using the Update: Just realized the |
And it looks like |
I think adding the macro would add complexity and am not sure what it would accomplish. There currently is no XForms syntax associated with current for type=hidden with a default: <one>default</one>
<bind nodeset="/hidden/one" type="string"/> vs <two>default</two>
<bind nodeset="/hidden/two" type="string" calculate="." /> Sidenote: I just noticed that calculate="." does not actually pass ODK Validate, so currently we'd have to do something like |
Fair points. I'm OK with documenting |
Precisely. The purpose of hidden - in my view - is precisely as a means to insert a constant (default) into the XForms instance XML, as @MartijnR noted. Having to do this using a redundant calculate is inefficient - it'll become yet another calculation to worry about re-evaluating whenever things change... I actually like hidden exactly the way it is! :-) Although the term 'constant' might indeed be a bit more descriptive. [well, not exactly the way it is... it would be even better to have a means to insert a constant element into the instance XML without the need for a binding, which you can have in raw XForms. But maybe that's asking for way too much]. |
|
So, this thread was about 2 different things, one of which is addressed. The remaining is a suggestion about adding a new 'exclude' column. Will update the title. |
hidden
question type
Might be nice to support exclude on groups and repeats as well. |
Edited the description of the 'hidden' question type, #116
In case it's helpful for reference: there's an undocumented—except for some SurveyCTO documentation and sample forms— It looks like the feature was added in 2011 but incurred a warning later the same year. |
The
hidden
question type is not documented on the main page or the ref table. It refers to this line in pyxform.The feature includes a question in the form but doesn't display it. Unfortunately it replaces the actual question type (e.g.
select_one animals
) so it's a bit unclear why it was implemented this way or what the ideal use case is.Any thoughts @MartijnR @yanokwa ?
The text was updated successfully, but these errors were encountered: