Skip to content

Remove ability to specify some settings on the survey sheet #820

Description

@lindsay-stevens

In workbook_to_json there's a code block that allows specifying some settings on the survey sheet. There does not seem to be any tests or docs for that behaviour. It was added in this commit (2012-01-09). So the proposal is to delete the code block, because it seems unlikely that anyone would use that functionality, and it is not consistent with long standing documentation about using the survey and settings sheets.

https://github.com/XLSForm/pyxform/blob/v4.2.0/pyxform/xls2json.py#L745-L750

# Check if the question is actually a setting specified
# on the survey sheet
settings_type = aliases.settings_header.get(question_type)
if settings_type:
    json_dict[settings_type] = str(row.get(constants.NAME))
    continue

The aliases.settings_header dict is currently:

settings_header = {
    "form_title": constants.TITLE,
    "set_form_title": constants.TITLE,
    "form_id": constants.ID_STRING,
    "set_form_id": constants.ID_STRING,
    "prefix": constants.COMPACT_PREFIX,
}

So users could write a form like the following, but would only work for the settings keys in the above dict:

| survey |
| | type       | name    | label |
| | form_title | my_form |       |
| | text       | q1      | Q1    |

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions