Modifying question text from ODK-Collect

hi there,

There is any way to modify the question text of a given question from
ODK-Collect?

It seems the text displaying is done by javarosa, and I can see a
FormEntryPrompt.getQText() method with no setter. The same happens with
FormEntryPrompt.getQuestion() where I can't modify the text. I was wondering
whether it's allowed to modify such text from ODK-Collect or I should go
deeper inside javarosa..

thanks in advance,

pau.

haven't looked at the javarosa-core in sometime, but i'm pretty sure you can't
modify question text. why do you need this functionality?

··· On Mon, May 16, 2011 at 06:39, Pau Varela wrote: > hi there, > > There is any way to modify the question text of a given question from > ODK-Collect? > > It seems the text displaying is done by javarosa, and I can see a > FormEntryPrompt.getQText() method with no setter. The same happens with > FormEntryPrompt.getQuestion() where I can't modify the text. I was wondering > whether it's allowed to modify such text from ODK-Collect or I should go > deeper inside javarosa.. > > thanks in advance, > > pau. > > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en >

if you want dynamic question text, use

··· On Mon, May 16, 2011 at 10:01 AM, Yaw Anokwa wrote:

haven't looked at the javarosa-core in sometime, but i'm pretty sure you
can't
modify question text. why do you need this functionality?

On Mon, May 16, 2011 at 06:39, Pau Varela pau.varela@gmail.com wrote:

hi there,

There is any way to modify the question text of a given question from
ODK-Collect?

It seems the text displaying is done by javarosa, and I can see a
FormEntryPrompt.getQText() method with no setter. The same happens with
FormEntryPrompt.getQuestion() where I can't modify the text. I was
wondering
whether it's allowed to modify such text from ODK-Collect or I should go
deeper inside javarosa..

thanks in advance,

pau.

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

Thanks for your replies,

we've coded some forms in Farsi, but utf-8 shows the text character by
character, without connecting the letters.. I need to transform the text
with some java code prior to display it in odk..

Drew, I understand is there replacement for the tag...
(pretty obvious :wink: How would you access it? and what about and
fields? would it be possible to also modify their question text
and label values?

pau.

··· 2011/5/16 Drew Roos

if you want dynamic question text, use

On Mon, May 16, 2011 at 10:01 AM, Yaw Anokwa yanokwa@gmail.com wrote:

haven't looked at the javarosa-core in sometime, but i'm pretty sure you
can't
modify question text. why do you need this functionality?

On Mon, May 16, 2011 at 06:39, Pau Varela pau.varela@gmail.com wrote:

hi there,

There is any way to modify the question text of a given question from
ODK-Collect?

It seems the text displaying is done by javarosa, and I can see a
FormEntryPrompt.getQText() method with no setter. The same happens with
FormEntryPrompt.getQuestion() where I can't modify the text. I was
wondering
whether it's allowed to modify such text from ODK-Collect or I should go
deeper inside javarosa..

thanks in advance,

pau.

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

if you need to transform text in that way, i'd look deep into the core
where the parsing takes place. the alternative (easier to code but
less efficient) is to do that transform every time you display
question text.

you can put output in labels. so for example,

confirm your name is ?

··· On Mon, May 16, 2011 at 07:18, Pau Varela wrote: > Thanks for your replies, > > we've coded some forms in Farsi, but utf-8 shows the text character by > character, without connecting the letters.. I need to transform the text > with some java code prior to display it in odk.. > > Drew, I understand is there replacement for the tag... > (pretty obvious ;) How would you access it? and what about and > fields? would it be possible to also modify their question text > and label values? > > pau. > > 2011/5/16 Drew Roos >> >> if you want dynamic question text, use >> >> On Mon, May 16, 2011 at 10:01 AM, Yaw Anokwa wrote: >>> >>> haven't looked at the javarosa-core in sometime, but i'm pretty sure you >>> can't >>> modify question text. why do you need this functionality? >>> >>> On Mon, May 16, 2011 at 06:39, Pau Varela wrote: >>> > hi there, >>> > >>> > There is any way to modify the question text of a given question from >>> > ODK-Collect? >>> > >>> > It seems the text displaying is done by javarosa, and I can see a >>> > FormEntryPrompt.getQText() method with no setter. The same happens with >>> > FormEntryPrompt.getQuestion() where I can't modify the text. I was >>> > wondering >>> > whether it's allowed to modify such text from ODK-Collect or I should >>> > go >>> > deeper inside javarosa.. >>> > >>> > thanks in advance, >>> > >>> > pau. >>> > >>> > >>> > -- >>> > Post: opendatakit@googlegroups.com >>> > Unsubscribe: opendatakit+unsubscribe@googlegroups.com >>> > Options: http://groups.google.com/group/opendatakit?hl=en >>> > >>> >>> -- >>> Post: opendatakit@googlegroups.com >>> Unsubscribe: opendatakit+unsubscribe@googlegroups.com >>> Options: http://groups.google.com/group/opendatakit?hl=en >> >> -- >> Post: opendatakit@googlegroups.com >> Unsubscribe: opendatakit+unsubscribe@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en >

i didn't think was supported anywhere other than question captions.
clayton tells me otherwise, so it might work, but i'd say be wary.

in general, any problem with utf-8 text rendering is outside the scope of
the application, and the responsibility of the underlying platform.

if you're already modifying code, you can hook into running arbitrary code
during an xform session by creating and registering a custom xpath function
handler. this would only help you inasmuch where you can use ,
though.

··· On Mon, May 16, 2011 at 10:18 AM, Pau Varela wrote:

Thanks for your replies,

we've coded some forms in Farsi, but utf-8 shows the text character by
character, without connecting the letters.. I need to transform the text
with some java code prior to display it in odk..

Drew, I understand is there replacement for the tag...
(pretty obvious :wink: How would you access it? and what about and
fields? would it be possible to also modify their question text
and label values?

pau.

2011/5/16 Drew Roos droos@dimagi.com

if you want dynamic question text, use

On Mon, May 16, 2011 at 10:01 AM, Yaw Anokwa yanokwa@gmail.com wrote:

haven't looked at the javarosa-core in sometime, but i'm pretty sure you
can't
modify question text. why do you need this functionality?

On Mon, May 16, 2011 at 06:39, Pau Varela pau.varela@gmail.com wrote:

hi there,

There is any way to modify the question text of a given question from
ODK-Collect?

It seems the text displaying is done by javarosa, and I can see a
FormEntryPrompt.getQText() method with no setter. The same happens with
FormEntryPrompt.getQuestion() where I can't modify the text. I was
wondering
whether it's allowed to modify such text from ODK-Collect or I should
go
deeper inside javarosa..

thanks in advance,

pau.

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

Ok, thanks again.

I'm not sure output option would work, because we do have already the text
within the xform and it's precisely what needs to be transformed.

As for the xpath function handler, I understand I should implement an
IFunctionHandler class, which receives an XPathNodeset, but I thought that
was to deal with values, not with the text descriptions.. at least this is
the way I used it in the past.. Am I right with this assumption?

As Yaw suggest, I'll try to investigate where the parsing is done and see
what I can do in there... I just wanted to be sure there was no option from
ODK before getting crazy with javarosa...

pau.

··· 2011/5/16 Drew Roos

i didn't think was supported anywhere other than question
captions. clayton tells me otherwise, so it might work, but i'd say be wary.

in general, any problem with utf-8 text rendering is outside the scope of
the application, and the responsibility of the underlying platform.

if you're already modifying code, you can hook into running arbitrary code
during an xform session by creating and registering a custom xpath function
handler. this would only help you inasmuch where you can use ,
though.

On Mon, May 16, 2011 at 10:18 AM, Pau Varela pau.varela@gmail.com wrote:

Thanks for your replies,

we've coded some forms in Farsi, but utf-8 shows the text character by
character, without connecting the letters.. I need to transform the text
with some java code prior to display it in odk..

Drew, I understand is there replacement for the
tag... (pretty obvious :wink: How would you access it? and what about
and fields? would it be possible to also modify their question
text and label values?

pau.

2011/5/16 Drew Roos droos@dimagi.com

if you want dynamic question text, use

On Mon, May 16, 2011 at 10:01 AM, Yaw Anokwa yanokwa@gmail.com wrote:

haven't looked at the javarosa-core in sometime, but i'm pretty sure you
can't
modify question text. why do you need this functionality?

On Mon, May 16, 2011 at 06:39, Pau Varela pau.varela@gmail.com wrote:

hi there,

There is any way to modify the question text of a given question from
ODK-Collect?

It seems the text displaying is done by javarosa, and I can see a
FormEntryPrompt.getQText() method with no setter. The same happens
with
FormEntryPrompt.getQuestion() where I can't modify the text. I was
wondering
whether it's allowed to modify such text from ODK-Collect or I should
go
deeper inside javarosa..

thanks in advance,

pau.

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en