Skip to content
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

'search' appearance doesn't work in combination with another appearance that contains hyphen dash #899

Open
sadiqkhoja opened this issue Feb 19, 2025 · 0 comments

Comments

@sadiqkhoja
Copy link
Contributor

Related forum post: https://forum.getodk.org/t/how-to-add-multiple-language-labels-in-csv-files-for-select-one-type-and-search/45685/3

If appearance value is "search('file.csv') columns-2" then Central is unable to detect that 'file.csv' is expected Form attachment, hence attachment tab doesn't appear.

Sample Form: Search_and_select.xlsx

Failing unit test:
it('should detect primitive search() appearances', () => {
      const xml = `
        <?xml version="1.0"?>
        <h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa">
          <h:head>
            <model/>
          </h:head>
          <h:body>
            <select1 appearance="columns-2 search('filesix.csv')"/>
          </h:body>
        </h:html>`;
      return expectedFormAttachments(xml).then((attachments) => {
        attachments.should.eql([
          { type: 'file', name: 'filesix.csv' },
        ]);
      });
    });

I originally thought that it's pyxform issue but it is Central that determines the list of attachment for a Form. I think this is something that Central can offload to Web Form engine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant