Page 1 of 2

Problem with list items and clearing fields

Posted: Fri Mar 07, 2014 3:15 pm
by Dennis Wormsbecher

I have a list on my form and mapped some fields to it. If I click on an item from the list the fields are populated with the correct data (which you then can alter and update). This works fine.
I also have a new button on the form, this button clears the content of the fields so it is clear you are making a new item (also works).
However after I have cleared the fields and I press on a list item again the fields remain empty!

Can anyone help me with this?

This is the code I use to clear the fields:
$('[dsid="txtPhotoName"]').val('');
$('[dsid="txtPhotoDescription"]').val('');
localStorage.setItem('_photoID', 0);


Problem with list items and clearing fields

Posted: Fri Mar 07, 2014 3:52 pm
by Maryna Brodina

Hello!
[quote:]click on an item from the list the fields are populated with the correct data[/quote]could you clarify how do you do that? What code or actions you use?


Problem with list items and clearing fields

Posted: Fri Mar 07, 2014 4:05 pm
by Dennis Wormsbecher

See also: "https://getsatisfaction.com/apperyio/..."
Same form a different problem.

Basically I use this setup:
http://docs.appery.io/tutorials/build...

But instead of a seperate detail page I call the read service on the same page and map it to the fields.
So I use TrialDB_tblPhoto_query_service to make the list and I use
TrialDB_tblPhoto_read_service to display the details in the fields.
Image


Problem with list items and clearing fields

Posted: Fri Mar 07, 2014 7:37 pm
by Maryna Brodina

Hello! We're able to reproduce the problem, looks like a bug. But we would need more time to research it. I'll update.


Problem with list items and clearing fields

Posted: Wed Mar 19, 2014 1:37 pm
by Dennis Wormsbecher

Hi,

Any updates yet?


Problem with list items and clearing fields

Posted: Wed Mar 19, 2014 2:54 pm
by Nikita

Hello,

You should clear textarea value in this way:
Appery("txtPhotoName").text("");


Problem with list items and clearing fields

Posted: Thu Mar 20, 2014 11:24 am
by Dennis Wormsbecher

Nikita,

Although I applaud your enthusiasm for the quick response. The proposed solution doesn't work.
Appery("txtPhotoName").text(""); - Doesn't do anything
Appery("txtPhotoName").val(""); - Does clear the field but the problem why I started this topic still remains...

I was also under the impression that :
$('[dsid="txtPhotoName"]').val(''); === Appery("txtPhotoName").val("");

So I will patiently keep waiting for a working solution.


Problem with list items and clearing fields

Posted: Thu Mar 20, 2014 2:06 pm
by Nikita

Hi Dennis,

Please share your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and specify the app name. And we'll test it.


Problem with list items and clearing fields

Posted: Thu Mar 20, 2014 3:03 pm
by Dennis Wormsbecher

Hi Nikita,

You mean like this? http://appery.io/app/view/c5d8b1d0-37...
5664f7cbb208/startScreen.html

Login Demo/user
click Health-test
Tab pictures

Any changes to the content of the field 'name' will negate some of the functionality of clicks on the list.

So It's not only when I make the field 'name' empty, with the button '!create new'.
But also for instance when I place an extra '2' after the 'brace yourself', clicking on the list will not update the field anymore.
Before any changes to the fields, clicking on the list does work fine.

Good luck.


Problem with list items and clearing fields

Posted: Thu Mar 20, 2014 4:16 pm
by Dennis Wormsbecher

Sorry, used wrong share.
I've invited appery in the correct way now.