Generate link to edit form

Hello,

I’ve tried to search for an answer to this but can’t find one in the forums.

In a data-checking script that I am creating, I would like to generate a link for someone to be able to edit a particular entry in a Kobo form - for example if an issue is found, I would like to be able to send the data-entry staff member a link to the response with the error so that they can amend it.

For context, data is pulled from Kobo via the API, and we will run the script. This link should be generated away from an internet browser, and lets assume that the person opening the link is signed already and has the permissions to edit forms.

When editing a submission online, by clicking the pencil/edit icon, a page opens up that seems to be in the following format:
https://ee.kobotoolbox.org/edit/<random string>?instance_id=<_uuid>&return_url=false

Each time I click to edit responses, the <random string> seems to change - can’t see any pattern there.

After opening one submission for editing, I’ve tried replacing the <_uuid> in the URL to that of another response. This doesn’t work and the following error comes up:

Guessing it’s something to do with the <random string> being also important.

How can I create this link so that it works? How do you know what the <random string> should be?

Thanks,

Welcome back to the community, @chrisbrowne! Maybe this post discussed previously should help you solve your issue:

Thanks Kal_Lam,

Does this method still work? I have tried this with my project as per the instruction and get the following message: “{“detail”:“Not found.”}”

The same happens when clicking the link in this post.

Cheers

@Kal_Lam , Sorry i didn’t tag you in the above. Kindly advise

Best,
Chris

Hi, is there a solution for the above as its not working anymore. Thanks

@ayitey7000, @chrisbrowne, FYR:

Hi @Kal_Lam ,

Thank you for following up with this. It seems, at least on my side, that row-permissions have no effect - it’s still not working.

Very confident that the link I am using is the correct format. The example link shared by @nartabaza is:

https://kobo.humanitarianresponse.info/api/v2/assets/azq8z4LQhekdmWta8RTyra/data/316312687/enketo/edit/?return_url=false

The link I am using is (with some characters changed for privacy):
https://kobo.humanitarianresponse.info/api/v2/assets/aGDDFuG74uLZPJis73Eb4Y/data/235725254/enketo/edit/?return_url=false

You can see that they are the same format. I have copy-pasted and double-checked the [uid] and [id] so there’s no typo.

In the sharing settings I have ticked the boxes that say:
Anyone can view this form
Anyone can view submissions made to this form

I have tried this link with the following:

  1. When logged in as the project owner (i.e. with all permissions)
  2. When logged in to an account to which the project has been shared, with all row permissions allowed
  3. Incognito window, i.e. with nothing logged in, and therefore no permissions

In all cases the same message is returned: {“detail”:“Not found.”}

This is becoming fairly critical on our end - @Kal_Lam @nartabaza kindly are you able to suggest a solution, or if I am doing this wrong somehow? The ideal is that anyone can edit a submitted form when clicking a link, without the need to sign in - @ayitey7000 has the same need I understand.

If it would be helpful for you to look into the account/project yourselves, would be very happy to share the credentials and link in a private message.

Cheers

Exactly point; this issue seemed ignored but is critical for some projects. I also get the same error; {“detail”:“Not found.”. Maybe somebody has been successful at it. Please share as edit link is problematic.

1 Like

@Kal_Lam @nartabaza Kindly, any updates?

Best,

Hello all,

We have found the above discussion around respondents being able to edit an existing submission very interesting. However, we are having the same problem as outlined above:

When we follow the instructions, we receive an error message saying {“detail”:“Not found.”}.

We would really appreciate your help!

Thanks in advance for your support.

Buen día

Este tema es bien especial y requiero igual de la solución

Han encontrado alguna solución

Gracias

Hi, I can briefly explain how create edit link works and share a video to explain it more.

So basically to create an edit link, you need to make a HTTP get request to Kobo server, after that kobo will provide you an edit link, you can’t just create one manually, you can just do the request. This return link is only valid for 30mins or one click, if you click it once by mistake, that link is dead.

You can use this link structure to make a Get request by using the Postman or you can pase it as URL while you are logged in your account. https://eu.kobotoolbox.org/api/v2/assets/{form_id}/data/{submission_id}/enketo/edit/?return_url=false .

You can find the video here where i explained it more: https://youtu.be/Dvav4O2jSUA