Page 1 of 2

Radio Button

Posted: Mon Jul 07, 2014 4:02 am
by nadiah jabbar

hello.
How i store data from a radio Button into my database?


Radio Button

Posted: Mon Jul 07, 2014 4:24 am
by Yurii Orishchuk

Hi Nadiah,

Please follow these steps:

1 Open your page in "data" mode.

2 Click on "edit mapping" for "create/update" service datasource.

3 Make mapping from your radioButton component to request field you need.

See details: http://prntscr.com/405sxy/direct

Also you can get value from this element with following code:

pre

//Note: "mobileradiogroup_5" is your component name.
var selectedValue = Apperyio("mobileradiogroup_5").find('input:checked').val();

//Now you can use "selectedValue" as you need.

/pre

Regards.


Radio Button

Posted: Mon Jul 07, 2014 5:31 am
by nadiah jabbar

sorry but i can't open the link you provided.


Radio Button

Posted: Mon Jul 07, 2014 7:53 am
by nadiah jabbar

hi Yurii,
i am unable to open the link that you have provided.

i still couldn't store the data of the radio button to the database.

this is my UI design.
do i need a input box for this?

Image

the mapping :

Image


Radio Button

Posted: Mon Jul 07, 2014 9:56 am
by Kateryna Grynko

Hi Nadiah,

Please follow the steps from Yurii. This should help. Here is the missing image. Image


Radio Button

Posted: Mon Jul 07, 2014 11:26 am
by Lim Samantha

Hi,
have tried the mapping, but still does not save into the database. Image Image


Radio Button

Posted: Mon Jul 07, 2014 1:05 pm
by Kateryna Grynko

Hi Lim,

Could you please post a screenshot of your Database collection? What fields do you use? Are there any console errors when you run service?


Radio Button

Posted: Mon Jul 07, 2014 3:10 pm
by Lim Samantha

There is no error when i test.
Image Image


Radio Button

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

Hi Lim,

Please try this use case:

1 Open your app, fill the form and press "save" to invoke "create" service.

2 Open your browser debuger on "network" tab and make screen shots where we can see request parameters. And response from server.

3 Open data base on your questions collection and see what item was just added(is here right fields?).

Regards.


Radio Button

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

Hi, so sorry but not very sure what you meant.

  1. Test out my appand click save? Where do i find the save button?

  2. Where to find my "network" tab?

    sorry.