Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Create Dynamic Tick List

Hi, I am attempting to create a dynamic list of Radio questions and answers each question has a 'True' and 'False' option displayed as answers. My aim is to create a list from a database service response but the styling is being lost and the buttons don't work as a group. The trial code I am using is here will you take a look and advise me on this?

var allItems = '';
for (var i=0; i< 4; i++){
var inp ='Inputtxt' + i ;
allItems += 'a rel="nofollow"/aNo faultsFault
Item ' + i + ' text or description
';
}
Appery("checklist").empty().append(allItems);
console.log(allItems);

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Create Dynamic Tick List

Hello Joe,

It is better to save all values for radio buttons to the storage array and use that array in the mapping: https://devcenter.appery.io/documenta...

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Create Dynamic Tick List

Hi Sergiy,

I am saving the values to a local webSQL table and querying the table to get the results then looping through these to build the list of questions. I can't see anywhere in the link that shows mapping to an array of objects do you have an example? It would be easy enough to place the results of the query into an array.

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Create Dynamic Tick List

Hi Sergie,

I have managed to work this out with the aid of the forum so please ignore my last comment. But I have three remaining issues:

1) how do I map the value of of the returned value to a string?

If in the service response I place alert(data[0]['Question']); I get the expected value returned. My mapping returns [object][object] in a mapped label.

Image

2) This is probably down to lack of styling! I have a radio button group within a grid component the buttons separate and appear one above the other!

3) How would I map an Id to each of the groups that would show which of the buttons had been selected.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Create Dynamic Tick List

Please add there: http://prntscr.com/9zuxjj JS below:

return value.Question;

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Create Dynamic Tick List

Hi Sergiy,

Thanks for your reply, could you also help me with this issue, grouped buttons that where displaying correctly are now miss-aligned as in the image below! no change has been made to the css!

Image

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Create Dynamic Tick List

It seems to width of it's parent component is not enought to these grouped buttons

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Create Dynamic Tick List

Hi I have shared a test app with support that shows the problem. Run the app 'popuptest' and then click run service which populates the data from a generic service and adds some grouped buttons to the page. The buttons lose there ability to show a different colour when selected (They appear not to be selectable!) and the shape is lost in every group with the buttons all miss-aligned. Will you have a look at this and let me know if there is a solution or work around to this please.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Create Dynamic Tick List

Could you please provide us it's name and with exact steps to reproduce this issue/problem?

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Create Dynamic Tick List

Hi Sergiy, The app is called 'popuptest' if you run the app the 'vehicle_check_page' will be loaded if you then click 'Run Service' the generic service will be run and the mapping will be populated.. There is only one data source on the page 'getCheckDataService' the generic service.

Return to “Issues”