Input value added via JS is not submitted correctly when appending it in workflow

Hey guys, I am relatively new to WeWeb, but I have made some great progress. It is highly frustrating that I am stuck on this problem which seems rather straight forward.

I have a Places autocomplete field in my form. With the JS and all, it works as expected. But I will need to send the lat/lon values instead of the places name that is shown on that input. So, I created another input short answer, and populated it’s lat/lon value as string with JS when a person selects from the list of places.

The console.log shows that the field is updated correctly. But when submitting the form, and I try to pass the value of that input, it always shows up blank in the API call. What am I doing wrong here?

I was feeling like such a brainiac when I got started with WeWeb, and this small little bug is pestering me beyond belief. Any help is appreciated.

weweb is a vuejs app, any direct element manipulation with code will be out of sync with it. If you need to update variables in weweb from external js code you can use wwLib. executeWorkflow and change the variable with an action in the workflow.
You can see an example in this post.
If this is not enough for your needs you can always create a custom element that integrates with weweb.

1 Like