Dataset not registering valueInserted data in input field

I have a fully working form where 90% of the fields are all submitting as they should. However, I have noticed that any fields that have ‘inserted’ data via the following method don’t seem to bring anything up in their linked fields in the dataset.

Google maps dropdown filter method (on the same page) used to obtain input 1’s value

let text = $w("#input1").value; // data of city name
$w("#input2").value = text; // data of city name used as part of submission

// I'm using the same method for the longitude and latitude in order to link
// it and bring up a map later in the repeater

Input 2 is linked to my submit form and should submit along with the other input fields into it’s respected field on the dataset. But the submitted form isn’t reading that there is/was any information in the input2 field (but you can clearly see that it’s there before it’s submitted).

If i manually type, the input2 field works fine. But this would lead to errors as I use this information as part of a dynamic page.

not sure why?

Many thanks for any help!

Thomas

Hey Thomas,

Believe it or not, I’m having the same problem. Misery loves company - now I don’t feel so stupid :upside_down_face:

I was playing around with something very similar (I’m using a dropbox and not an input field) and the field in the collection ends up empty.

I sent this to QA, and had continued playing with this under the assumption that I was doing something wrong. Now I know it’s not just me.

And , now I realize that this might be the same issue that someone else is having - I’m unable to figure out what’s wrong.

The interesting - no forget that - the vexing thing is that sometimes it works and sometimes it doesn’t.

Hopefully QA will either tell me that there’s a bug and it will be fixed soon, or they’ll tell me how easy it is to do and I’ll feel stupid.

I’ll be back when I find out what’s going on.

Yisrael

Here’s a workaround that I just came up with:

$w("#input2").value = text;
$w("#dataset1").setFieldValue("input2", text);

(Just change #dataset1 to the name of your dataset.)
OK, I know it’s ugly, but it works. Beauty is in the eyes of the beholder.

I used this to fix a problem I was having with one of my projects, and then I shared it with another user having the same problem.

I hope this helps.

Yisrael

Hi Yisrael

Many thanks for the tip! Glad I wasn’t the only one!

I worked it a little differently in the end. I only really wanted the input fields for aesthetic purposes/to act as a required field so they couldn’t submit without the location details.

So I assigned the input2 field to an empty/dummy field on my dataset and set it to required. This way they have to click the input to trigger the Google Maps Places container dropdown (the GMP onClick container copies across to the dummy field (to give it a value and fulfill the ‘required’, and then sets the details to the field value).

My code ended up:

$w("#input2").value = text; // gives 'required' input a value to submit
$w("#dataset1").setFieldValue("fieldName", text); // data for dynamic page

Bit more of a long-winded work around. But, hey. If it works, it works!

Thanks again for the help!

Thomas

Hi Yisrael, I’ve used this work around, and for a time it worked beautifully. Unfortunately, it is no longer functioning. It quite literally just stopped working. Have you encountered this as well?