Copy field value in another field

  • yohann.aube
    Asked on August 31, 2020 at 5:16 AM

    Hello,

    I've built a form where I propose to users to come pick-up an object at their place and then deliver it back.

    Hence, it is possible that pick-up and delivery addresses are the same so I put a condition that if the user say that they are the same I want the field Delivery address to be filled up with the value of pick up address.

    Unfortunately, when I do this I'm not able to get any value in my Airtable corresponding field.

    Any idea on why it does not work?

    Thank you very much

  • Bojan Support Team Lead
    Replied on August 31, 2020 at 7:24 AM

    Greetings.

    I have tested your form and the value is successfully copied to the delivery address. 

    Can you please clarify what the problem is with the Airtable? You can simply select the desired field from the form which should be copied to your table.

    Thank you for your cooperation. 

  • yohann.aube
    Replied on August 31, 2020 at 8:02 AM

    My problem is that when a user indicates that the delivery address is identical to the pick up address the field "Delivery address'' is hidden.

    I just realized that if the field is not hidden I get the value in the corresponding Airtable field but what I would do is having the field hidden for the user AND the associated value in Airtable.

    For the moment with my condition "if delivery address is identical to pick up address then hide delivery address field" I don't manage to obtain the value in Airtable.

  • Bojan Support Team Lead
    Replied on August 31, 2020 at 9:16 AM

    Thank you for the clarification.

    The problem is that, by default, the field value is cleared when submitted if it's hidden. You can update this from the form settings:

    Copy field value in another field Image 1 Screenshot 40If you set it to Don't clear, field values will be sent to Airtable, even if they are hidden.

    After you update this setting, I would suggest you copy the value of the address field to the delivery address in any case:

    Copy field value in another field Image 2 Screenshot 51

    You need to check if the original address is filled, and if it is, you can copy the value to the second field:

    Copy field value in another field Image 3 Screenshot 62

    This way, the delivery address will always be filled, and you can use it for Airtable. If the user chooses to update it, you can show it using the conditional logic, and the user can update the address.

    Let us know if this solution will work for you.