saving radiobuttongroup value
forgot to say, just in case code is run on order button
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
forgot to say, just in case code is run on order button
Will take a look, but this will take some time.
OK lllya,
I understand.
Thanks
Hi Michael,
To reach your goal you need:
Find needed grid cell.
Find checked input.
Get this input value.
Here is a worked code:
pre
//Where "mobilegridcell_46_319_350" is gridcell name with goal radiogroup inside.
var radioValue = $grid.find("[name='mobilegridcell_46_319_350'] input:checked").val();
/pre
Regards.
thanks Yurii,
but how do I intergrate it with this code to save it to same array as other components
thanks
$grid = $(this).closest("[name=chickenpizzamobilegrid]");
save({'Kebab':$grid.find("[name=chickenpizza_item_label]").text(),
'Served_With':$grid.find("[name=mobileradiogroup1]").val(),
'Price':$grid.find("[name=chickenpizzaPricelabel]").text()},
"kebabArray");
also as the page is populated by rest service, I cant code this as every mobilegrid and mobilegridcell will have different index
Hi Michael,
You just need to use "radioValue" value in the variable you need.
pre
$grid = $(this).closest("[name=chickenpizzamobilegrid]");
//Where "mobilegridcell_46_319_350" is gridcell name with goal radiogroup inside.
var radioValue = $grid.find("[name='mobilegridcell_46_319_350'] input:checked").val();
save({'Kebab':$grid.find("[name=chickenpizza_item_label]").text(),
'Served_With': radioValue,
'Price':$grid.find("[name=chickenpizzaPricelabel]").text()},
"kebabArray");
/pre
Regards.
Hi Yurii,
this solution works great for me, I was able to add my second radiobutton group as well!
Thanks for your input here, its very much appreciated
Best!
Michael
code$grid = $(this).closest("[name=chickenpizzamobilegrid]");
//Where "mobilegridcell_46_319_350" is gridcell name with goal radiogroup inside.
var radioValue = $grid.find("[name='mobilegridcell_46_319_350'] input:checked").val();
var radioValue2 = $grid.find("[name='mobilegridcell_458'] input:checked").val();
save({'Kebab':$grid.find("[name=chickenpizza_item_label]").text(),
'Served_With': radioValue,
'Sauce': radioValue2,
'Price':$grid.find("[name=chickenpizzaPricelabel]").text()},
"kebabArray");/code