Hello all,
I'm essentially a newbie who is comfortable with creating basic forms in
xml for use on an adroid phone. my new assignment is to include an image in
the xml that will display on the phone along with text.
I see that this capability is available now, but can't make the code
examples from the opendatakit work for my case. In the below code, there
are 4 choices in the field CleftDescription (in blue below). I want to
display an image with each choice.
Where do I insert the instructions to display the image? where does the
jr://images/filename.jpg command belong????
------------------------------ code begins here. appreciate any help
···
-----------------------------------
OpSmile
Patient Name
Date
Date of Assessment
Patient photo
Capture an image of the patient
Age
Enter current age of patient
Describe the patient's cleft condition
choose all that apply
Left unilateral cleft lip
Right unilateral cleft lip
Bilateral cleft lip
Cleft palate
Comments
Left_unilateral_cleft_lip
Right_unilateral_cleft_lip
Bilateral_cleft_lip
Cleft_palate
Ruth:
Here is an example:
<text id="/data/CleftDescription:option0">
<value>Left unilateral cleft lip</value>
<value form="image">jr://images/option0.jpg</value>
</text>
You then need to make sure that all your .jpg files are in a folder
called "formname-media" (where formname is replaced by your form's
name) that you place in /sdcard/odk/forms/ on your phone.
Gaetano
···
On Tue, Jun 21, 2011 at 8:46 AM, Ruth Little wrote:
> Hello all,
> I'm essentially a newbie who is comfortable with creating basic forms in
> xml for use on an adroid phone. my new assignment is to include an image in
> the xml that will display on the phone along with text.
>
> I see that this capability is available now, but can't make the code
> examples from the opendatakit work for my case. In the below code, there
> are 4 choices in the field CleftDescription (in blue below). I want to
> display an image with each choice.
>
> Where do I insert the instructions to display the image? where does
> the jr://images/filename.jpg command belong????
>
> ------------------------------ code begins here. appreciate any help
> -----------------------------------
>
> 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">
>
> OpSmile
>
>
> revision_date="2011-06-20">
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Patient Name
>
>
>
>
>
> Date
>
>
> Date of Assessment
>
>
> Patient photo
>
>
> Capture an image of the patient
>
>
> Age
>
>
> Enter current age of patient
>
>
> Describe the patient's cleft condition
>
>
> choose all that apply
>
>
> Left unilateral cleft lip
>
>
> Right unilateral cleft lip
>
>
> Bilateral cleft lip
>
>
> Cleft palate
>
>
> Comments
>
>
>
>
>
>
> jr:preloadParams="deviceid"/>
> jr:preload="property" jr:preloadParams="subscriberid"/>
> jr:preloadParams="simserial"/>
>
>
>
>
>
> required="true()"/>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Left_unilateral_cleft_lip
>
>
>
> Right_unilateral_cleft_lip
>
>
>
> Bilateral_cleft_lip
>
>
>
> Cleft_palate
>
>
>
>
>
>
>
>
>
>
we will also be putting up example forms with multimedia once we
finalize collect 1.1.7.
···
On Tue, Jun 21, 2011 at 12:17, Gaetano Borriello wrote:
> Ruth:
>
> Here is an example:
>
>
> Left unilateral cleft lip
> jr://images/option0.jpg
>
>
> You then need to make sure that all your .jpg files are in a folder
> called "formname-media" (where formname is replaced by your form's
> name) that you place in /sdcard/odk/forms/ on your phone.
>
> Gaetano
>
>
>
> On Tue, Jun 21, 2011 at 8:46 AM, Ruth Little wrote:
>> Hello all,
>> I'm essentially a newbie who is comfortable with creating basic forms in
>> xml for use on an adroid phone. my new assignment is to include an image in
>> the xml that will display on the phone along with text.
>>
>> I see that this capability is available now, but can't make the code
>> examples from the opendatakit work for my case. In the below code, there
>> are 4 choices in the field CleftDescription (in blue below). I want to
>> display an image with each choice.
>>
>> Where do I insert the instructions to display the image? where does
>> the jr://images/filename.jpg command belong????
>>
>> ------------------------------ code begins here. appreciate any help
>> -----------------------------------
>>
>> > 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">
>>
>> OpSmile
>>
>>
>> > revision_date="2011-06-20">
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Patient Name
>>
>>
>>
>>
>>
>> Date
>>
>>
>> Date of Assessment
>>
>>
>> Patient photo
>>
>>
>> Capture an image of the patient
>>
>>
>> Age
>>
>>
>> Enter current age of patient
>>
>>
>> Describe the patient's cleft condition
>>
>>
>> choose all that apply
>>
>>
>> Left unilateral cleft lip
>>
>>
>> Right unilateral cleft lip
>>
>>
>> Bilateral cleft lip
>>
>>
>> Cleft palate
>>
>>
>> Comments
>>
>>
>>
>>
>>
>>
>> > jr:preloadParams="deviceid"/>
>> > jr:preload="property" jr:preloadParams="subscriberid"/>
>> > jr:preloadParams="simserial"/>
>>
>>
>>
>>
>>
>> > required="true()"/>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Left_unilateral_cleft_lip
>>
>>
>>
>> Right_unilateral_cleft_lip
>>
>>
>>
>> Bilateral_cleft_lip
>>
>>
>>
>> Cleft_palate
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
So, the image reference and the text reference must both be stored in the
itext?
If you are not using the itext (i.e. a form that has only one language) how
do you refer to the image?
☞§※☼:airplane:
~Neil
···
On Tue, Jun 21, 2011 at 12:18 PM, Yaw Anokwa wrote:
we will also be putting up example forms with multimedia once we
finalize collect 1.1.7.
On Tue, Jun 21, 2011 at 12:17, Gaetano Borriello gaetano@cs.washington.edu wrote:
Ruth:
Here is an example:
<text id="/data/CleftDescription:option0">
<value>Left unilateral cleft lip</value>
<value form="image">jr://images/option0.jpg</value>
</text>
You then need to make sure that all your .jpg files are in a folder
called "formname-media" (where formname is replaced by your form's
name) that you place in /sdcard/odk/forms/ on your phone.
Gaetano
On Tue, Jun 21, 2011 at 8:46 AM, Ruth Little ruth007little@gmail.com wrote:
Hello all,
I'm essentially a newbie who is comfortable with creating basic forms
in
xml for use on an adroid phone. my new assignment is to include an
image in
the xml that will display on the phone along with text.
I see that this capability is available now, but can't make the code
examples from the opendatakit work for my case. In the below code,
there
are 4 choices in the field CleftDescription (in blue below). I want to
display an image with each choice.
Where do I insert the instructions to display the image? where does
the jr://images/filename.jpg command
belong????
------------------------------ code begins here. appreciate any help
<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>
<h:title>OpSmile</h:title>
<device_id/>
<subscriber_id/>
<sim_id/>
Patient Name
Date
Date of Assessment
Patient photo
Capture an image of the patient
Age
Enter current age of patient
Describe the patient's cleft condition
choose all that apply
Left unilateral cleft lip
Right unilateral cleft lip
Bilateral cleft lip
Cleft palate
Comments
</h:head>
<h:body>
Left_unilateral_cleft_lip
Right_unilateral_cleft_lip
Bilateral_cleft_lip
Cleft_palate
</h:body>
</h:html>
Correct, the media references are stored in the itext. This allows you to
include different media on a per-language basis.
If you're only using a single language, you only need to define text ids for
those items where you want to include media.
This is a question with an image
jr://images/test.gif
then in your body:
Question 2
...
···
On Wed, Jun 22, 2011 at 10:37 AM, Neil Hendrick wrote:
So, the image reference and the text reference must both be stored in the
itext?
If you are not using the itext (i.e. a form that has only one language) how
do you refer to the image?
☞§※☼:airplane:
~Neil
On Tue, Jun 21, 2011 at 12:18 PM, Yaw Anokwa yanokwa@gmail.com wrote:
we will also be putting up example forms with multimedia once we
finalize collect 1.1.7.
On Tue, Jun 21, 2011 at 12:17, Gaetano Borriello gaetano@cs.washington.edu wrote:
Ruth:
Here is an example:
<text id="/data/CleftDescription:option0">
<value>Left unilateral cleft lip</value>
<value form="image">jr://images/option0.jpg</value>
</text>
You then need to make sure that all your .jpg files are in a folder
called "formname-media" (where formname is replaced by your form's
name) that you place in /sdcard/odk/forms/ on your phone.
Gaetano
On Tue, Jun 21, 2011 at 8:46 AM, Ruth Little ruth007little@gmail.com wrote:
Hello all,
I'm essentially a newbie who is comfortable with creating basic forms
in
xml for use on an adroid phone. my new assignment is to include an
image in
the xml that will display on the phone along with text.
I see that this capability is available now, but can't make the code
examples from the opendatakit work for my case. In the below code,
there
are 4 choices in the field CleftDescription (in blue below). I want to
display an image with each choice.
Where do I insert the instructions to display the image? where does
the jr://images/filename.jpg command
belong????
------------------------------ code begins here. appreciate any help
<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>
<h:title>OpSmile</h:title>
<device_id/>
<subscriber_id/>
<sim_id/>
Patient Name
Date
Date of Assessment
Patient photo
Capture an image of the patient
Age
Enter current age of patient
Describe the patient's cleft condition
choose all that apply
Left unilateral cleft lip
Right unilateral cleft lip
Bilateral cleft lip
Cleft palate
Comments
</h:head>
<h:body>
Left_unilateral_cleft_lip
Right_unilateral_cleft_lip
Bilateral_cleft_lip
Cleft_palate
</h:body>
</h:html>