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

Add element on page that will contain the sought var name #119

Closed
plocket opened this issue Jun 10, 2021 · 2 comments
Closed

Add element on page that will contain the sought var name #119

plocket opened this issue Jun 10, 2021 · 2 comments
Assignees
Labels
add field Stuff relating to adding new fields to the test interviews

Comments

@plocket
Copy link
Collaborator

plocket commented Jun 10, 2021

The one currently in da is going to go away. I'm just going to merge this one straight in because we need it. We may still have trouble with some pages, like ones that were triggered with mandatory: True.

<div data-variable="dXNlcnNbMV0ubmFtZS5maXJzdA" id="trigger" aria-hidden="true" style="display: none;"></div>
@plocket plocket self-assigned this Jun 10, 2021
@plocket
Copy link
Collaborator Author

plocket commented Jun 10, 2021

I take that back - mandatory: True pages seem to have a sought var value of 'None' when we add the element in ourselves. That should do just fine I think because of the way we don't require sought vars to be defined.

There are probably tricky situations where it could still come up, like on signature pages that are mandatory or something.

  • Someone make an issue to test that someday. (#120)

@plocket
Copy link
Collaborator Author

plocket commented Jun 10, 2021

This currently doesn't work on signature screens, so I have to add it to another part of the screen that I'm not sure will work on mobile phones. I don't know of another way to do this right now. That is, I could do it for our tests, but I believe other interviews can't do this easily because they're already using those screen parts and we can't help them because that content is not composable/additive. We can't access the value we need from javascript files that we could include because they can only get the variables that are on the page, but they need to run at daPageLoad and happen before those values get there, I think. I dunno. It didn't work. Not even with get_interview_variables. We could do it with some sort of polling function, but that's a bit nuts.

Things we tried with the js:

  • value( 'sought_var' ) with that defined in the python.
  • get_interview_variables. Don't remember why that didn't work even though I just did it. The sought var code block was initial: True, but maybe the page loads before these vars are calculated? I don't remember. Also, a note says that it's slow. Just fyi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add field Stuff relating to adding new fields to the test interviews
Projects
None yet
Development

No branches or pull requests

1 participant