Change static text in groups prompt

Is there any way to change the text in the pop-up when asking if you want
to add a group? For example, the current pop-up has a heading saying 'Add
new group?' with smaller text asking 'Add new "NAMEOFGOUP" group?

In my case we are counting the number of rooms in a house so would like the
text to simply say 'Add new Room?'

Anyone else managed to solve this issue?

Fingers crossed...

1 Like

There is an alternate mechanism for navigating groups within forms that is
available in Javarosa, which allows you to customize everything. That has
not been coded into ODK Collect.
If anyone is willing to dive in and make the needed changes, we'll fold the
changes into the main code branch.

Mitch

ยทยทยท On Wed, Aug 1, 2012 at 7:01 AM, dj_bridges wrote:

Is there any way to change the text in the pop-up when asking if you want
to add a group? For example, the current pop-up has a heading saying 'Add
new group?' with smaller text asking 'Add new "NAMEOFGOUP" group?

In my case we are counting the number of rooms in a house so would like
the text to simply say 'Add new Room?'

Anyone else managed to solve this issue?

Fingers crossed...

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

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Thats good to know Mitch. We can probably find some money to pay a
developer to do this work depending on how long you think it might take.
Would you be able to guestimate the amount of work this would be to see if
we could pursue this?

It isn't much work -- the key is understanding the new mechanism within
Javarosa and implementing a new dialog in ODK Collect to work with that
mechanism.
The result should mimic the functionality of the J2ME phone implementations
that use this new mechanism.

This involves:
(1) one-liner: create the FormEntryModel with a 2nd argument,
FormEntryModel.REPEAT_STRUCTURE_NON_LINEAR
This will cause javarosa to no longer report
FormEntryController.EVENT_PROMPT_NEW_REPEAT events, but to now report
FormEntryController.EVENT_REPEAT_JUNCTURE events.

(2) update the form traversal code in
org.odk.collect.android.logic.FormController (e.g., stepToNext...,
stepToPrevious... etc.) to properly track where they are in the form and
when they encounter a FormEntryController.EVENT_REPEAT_JUNCTURE event,
descend into (or not) each repeat group, in sequence, as they traverse
through the form. The FormEntryController.EVENT_PROMPT_NEW_REPEAT code
paths go away.

(3) in FormEntryActivity and FormHierarchyActivity, move the behaviors/code
handling of this event: FormEntryController.EVENT_PROMPT_NEW_REPEAT
over to this event: FormEntryController.EVENT_REPEAT_JUNCTURE and add
additional functionality to the add-repeat dialog to construct the labels
from the caption fields in the form (if supplied) and to enable you to
select which of the repeats in the repeat group you want to enter, etc.
(the new dialog is a "juncture" dialog with increased navigational
flexibility to allow you to choose which of the repeated elements you dive
into, to add a new repeat, to delete one of the repeats, or to skip the
repeats entirely).

Drew Roos has pointed me to this J2ME code (not sure which of the many
repositories have the best code to work off of) :

ChatterboxWidgetFactory.getRepeatJunctureWidget()
ChatterboxWidgetFactory.getRepeatDeleteWidget()
Chatterbox.questionAnswered()

Also attached is a form that illustrates the various caption customizations
that would be used to construct the text for this new repeat juncture
dialog.

repeattest.xml (2.12 KB)

ยทยทยท -------- Mitch

On Wed, Aug 1, 2012 at 11:44 PM, dj_bridges danieljbridges@gmail.comwrote:

Thats good to know Mitch. We can probably find some money to pay a
developer to do this work depending on how long you think it might take.
Would you be able to guestimate the amount of work this would be to see if
we could pursue this?

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

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com