How to copy the answer of the previous question and put it to the next

Hi everyone, please help me with this .i just want to know if there is code on how to set the default answer to the question. But the answer is from the answer from a previous question. Here is the sample

  1. What is your lastname?
    Ans. Lucero

  2. Lastname of your son:
    ANS. Lucero

Hi Ronald,

Do you want to double check the answer if entered correctly or you would
want to auto-generate the answer? If the first scenario, you could
constraint the answer to the previous entered field. If second scenario,
you can either use the calculate, or readonly.

Thanks

··· On Wednesday, September 16, 2015 at 7:55:25 PM UTC+3, Ronald Lucero wrote: > > Hi everyone, please help me with this .i just want to know if there is > code on how to set the default answer to the question. But the answer is > from the answer from a previous question. Here is the sample > > 1. What is your lastname? > Ans. Lucero > > 2. Lastname of your son: > ANS. Lucero

Set field name in this way:

  1. rd_last_name -> 'abc'
  2. Default attribute of field rd_last_name_child input: ${rd_last_name}

That should give you the automatically filled field

Hung,

The problem with this approach is that rd_last_name it will overwrite
whatever attribute you put in rd_last_name_child. That is,
rd_last_name_child has to be read only or you risk data loss.

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Wed, Sep 30, 2015 at 9:04 AM, Hung Pham hpham2709@gmail.com wrote:

Set field name in this way:

  1. rd_last_name -> 'abc'
  2. Default attribute of field rd_last_name_child input: ${rd_last_name}

That should give you the automatically filled field

--

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


You received this message because you are subscribed to the Google Groups "ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hello @Hung_Pham. Can you give me sample example please? I was doing a form that ID and name is asked in the beginning of the survey, and needed to write again in the same form before ending it but similar ID and name. How I set rd_last_name -> 'abc' OR Default attribute of field rd_last_name_child input: ${rd_last_name} kind for my type? can you say some thing where I should put these commands?

Hi @kiefdag
please attach a sample xls form so that we can help you.