I was having trouble processing data from an input field, so I created a little test in order to debug the problem:
I have a page in my app with 4 input fields. I have a button to process the input to those fields. I have set the input to my JS function as “Input Field #5.”
I simply output the inputs.input1 variable to see what it looks like (for debugging purposes. I was surprised to see that it contains ALL data from ALL input fields on the page.
Of course, with this setup, I would expect inputs.input1 to contain ONLY the value of that particular input field. Is this normal?
I don’t suppose this is a problem to receive all of the data - I can parse it. I just find it strange that the Appgyver user interface would ask me to specify the particular source of the input and then ignore that specification and pass the values of all of the input fields on the page.
To me, it looks like by attaching the JS to the button, all the data processed by the button is sent to JS.
I’d try adding an intermediate pageVar for that input in between and you’ll filter down the data to that input.
But for debugging, I use the easy Alert flow function. Shows me all content of an object or list.
Good idea. It’s just “cleaner” to pass into the function only the data that I need because I can then avoid some unnecessary processing. Still seems strange to me, though.
This sounds like an interesting little issue I’ll try making a test case for it to see if it can be solved to only give the value of that specific input field, but in the meanwhile try the page variable approach ^
but this produced the expected result of alerting exactly what was in the input field selected. I tested in web only – does your issue reproduce on web or only on device?
@Mevi I would be happy to share my app, but I don’t know how to do that. I just run my simple apps on my phone using the Appgyver development app. I’ve never “published” an app.
FWIW, the app I am presently working on is an astronomy helper app that converts celestial coordinates of right ascension / declination into altitude / azimuth. If you will point me to instructions on how to share it with you, I will.