How copy last answer from the field?

  • laniraflar
    Asked on January 26, 2019 at 11:10 AM

     hi, my form has a repeating questions

    and in many cases the next answer will be similar to the last 

    trying to make a function that copes the last answer.

    unfortunately, by using conditions such as "if filled" then copy value. 

    once I'm changing the value it will change the following questions as well.

    and by trying the calculated form widget it's the same if the field before that one is being changed it will be changed as well while what we need is that it will copy the value from the former question but will not change it unless the user will edit it.

  • jonathan
    Replied on January 26, 2019 at 3:56 PM

    You can easily achieve this using the Edit Link feature + Conditions that uses the Edit URL.

    1. The Edit Link allows the user to edit form submission data.

    User guide: How to Let Users Update Their Form Submissions at a Later Date

    2. Create condition logic that will only allow the user to edit when in edit mode using the edit link URL.

    User guide: How to Show or Hide Fields on Edit URL

    Although the guide for #2 refers to show/hide condition, you can use the same method for update value conditions.

    Let us know if you need further assistance on this.

  • laniraflar
    Replied on January 26, 2019 at 7:00 PM

    it seems you answered both my questions but they are different questions ('similar')

    when they both on the same case but different fields.

    the first question was to know if I can define a "default" value which I can multiply to several fields that will use it. the thing is that I didn't want to make to each field a condition if x= "foo" then copy value to .... etc.

     

    this question was asking if during the form filling (from my users) they what to copy the last questions values to this one and just edit one and only change one answer and go to the next questions. I did so with form calculation value multiply by parameter (1 or 0) but if later ones go back to the questions and will change the value it will change the other values as well. and then I changed it to condition but it's the same every time I change the former values it is connected to the other values. I asked if there is a way to copy "one time" without connecting the value to the field we copy from. 

  • Jed_C
    Replied on January 26, 2019 at 10:38 PM

    The first question was to know if I can define a "default" value which I can multiply to several fields that will use it.

    If you will be getting a default value from a field, that would required a condition to insert or copy the fields value, this means that you will need to call the field multiple times depending on your condition.

    Reference guide: https://www.jotform.com/help/268-How-to-Insert-Text-or-Calculation-into-a-Field-Using-Conditional-Logic.

    Please note that this condition will only copy field value if condition is met. Example, if user answered "Yes", this means that the condition will be copying the last question to another field.

    Let us know if you have any questions or if you need further assistance.