-
Notifications
You must be signed in to change notification settings - Fork 138
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 default value support for image questions #405
Comments
The transformation should really happen for defaults for any type that results in a |
or just for all "image" questions if too cumbersome to do all binary types |
Taking a shot at this now, sounds like, at least for images, we just need to append the file path properly |
Does this mean a multiple choice question with a few images for each choice label? or could a default value actually be needed for some other type of "image question"? @MartijnR Got an example you can send me to get the rust out of my brain? |
I'm also having trouble figuring out where annotations are in the spec - I think I am looking in the wrong place? I will keep looking but just thought I would ask here first :) |
Thanks for looking into this, @KeynesYouDigIt!
Correct. If there is something in the
No, it's unrelated to select questions. We're talking about questions that prompt the user for an image.
I think you mean |
Check it out guys, I love this issue so much I SOLVED IT TWICE lol, what I really wanted is to grab the low hanging fruit of handling images, then shoot up a draft at handling defautls for all binaries. the later includes some refactoring, but please feel free to shut it down if it's going down a dangerous path (haha get it, cause most of this work involves paths??) In all serious ness, if we decide that binary default support is really just needed on image questions, lets reject #539 and merge #538. |
@MartijnR @lognaturel sorry for my unfamiliarity here - Do either of you know if default value itself must be wrapped like <model odk:xforms-version="1.0.0">
<instance>
<static_image id="pyxform_autotest_id_string">
<my_image><a>jr://images/my_default_image.jpg</a></my_image> ? or will this happen on submital? I am going to try and test this myself but I am kinda still shaking of the rust from my getting married and buying a house phase where I didnt work on this much, If either of you are bored it'd be sweet if you could pull down #538 and see if tags are added to annotations as expected (IF you dont already know off the top of your head that they will/won't be) |
Will try to look at the PR this week, thanks. The jr:// reference goes directly in the question tag. No a tag should be added. |
If an image question has a default value (a filename), the XForm should prepend this value with
jr://images/
.So if the default column for annotate question
a
containsbody.png
, the output in the XForm instance should be:<a>jr://images/body.png</a>
.Note that this value transformation is the same as what is used for values in the
media::image::
orimage
column.(As agreed here. XForms spec PR is here.)
The text was updated successfully, but these errors were encountered: