Page 2 of 7

Displaying Data

Posted: Tue Jul 08, 2014 1:10 am
by Lim Samantha

Hi,
is this code for us or you reply to the wrong person?


Displaying Data

Posted: Tue Jul 08, 2014 1:20 am
by Yurii Orishchuk

Hi Lim,

Sorry, this answer is wrong for this topic. Please ignore it.

Regards.


Displaying Data

Posted: Tue Jul 08, 2014 2:12 am
by Yurii Orishchuk

Lim,

Ok, in this case(when you have iterating items) use this solution:

1 Activate your button by click on it.

2 Open "EVENTS" bottom panel.

3 Add JS event handler on "click" event for this button component: http://prntscr.com/40h8wd/direct

pre

//Set your component names.
var inputName = "mobiletextinput_38";
var labelName = "mobilelabel_39";
var itemElement = "mobilegrid_33";

var currentElement = jQuery(this);

//Note: you should replace "yourItemElement" with name of component which is you iterate with mapping.
var currentItem = currentElement.closest('[name="' + itemElement + '"]');

//Get value from input
var bananaValue = currentItem.find('[name="' + inputName + '"]').val();

/pre

That's all.

Regards.


Displaying Data

Posted: Tue Jul 08, 2014 2:27 am
by Lim Samantha

Hi, have tried your codes but i can't add any items now.
What do i replace with my itemElement?
What do you mean "yourItemElement" with name of component which I iterate with mapping?
Here are the screenshots of my mapping and layout.

Image Image


Displaying Data

Posted: Tue Jul 08, 2014 2:39 am
by Yurii Orishchuk

Lim,

Probably you have deleted link from $[] - some grid?

See details on this screen shot: http://prntscr.com/40hgkf/direct

In this case your "itemElement" is - "mobilegrid_319".

Regards


Displaying Data

Posted: Tue Jul 08, 2014 2:54 am
by Lim Samantha

I follow the above steps, still aren't able to add in. :( Image


Displaying Data

Posted: Tue Jul 08, 2014 3:37 am
by Yurii Orishchuk

Lim,

Please specify current problem that's you have.

Regards.


Displaying Data

Posted: Tue Jul 08, 2014 4:19 am
by Lim Samantha

Hi,
i am still unable to add in my actual cost and display on the label and save it into the database.


Displaying Data

Posted: Tue Jul 08, 2014 4:23 am
by Yurii Orishchuk

Lim,

Please give us your app public link and describe in details steps to reproduce your problem.

Thanks & regards.


Displaying Data

Posted: Tue Jul 08, 2014 4:26 am
by Lim Samantha

Is this the app public link? http://appery.io/app/project/8ede79da...
sorry im not very sure.

Steps are:

  1. When i type in 12 for the actual amount, the label below will change to 12. and it will be saved into our database.

    https://d2r1vs3d9006ap.cloudfront.net... (shown in this picture)