Page 1 of 2
saving radiobuttongroup value
Posted: Fri Apr 03, 2015 3:45 pm
by Michael4771079
Hi,
Im tring to save radiobuttongroup value, here is my code
the code is saving the kebab name "chickenpizza_item_label" and
price "chickenpizzaPricelabel" but not the radiobutton value
code is run on button click
here is a screenshot of result in localstorage
no errors in console
can you help?
Thanks
code$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");
/code
saving radiobuttongroup value
Posted: Fri Apr 03, 2015 4:04 pm
by Illya Stepanov
Hi Michael --
Please check if this radioButton actually is inside "chickenpizzamobilegrid".
saving radiobuttongroup value
Posted: Fri Apr 03, 2015 4:21 pm
by Michael4771079
Hi lllya,
everything is in chickenpizzamobilegrid
here is a screenshot of the builder
saving radiobuttongroup value
Posted: Fri Apr 03, 2015 4:35 pm
by Illya Stepanov
No - as far I remember your app, you have a grid and inside it collabsibleset with grids inside a collabsibleblockcontent.
saving radiobuttongroup value
Posted: Fri Apr 03, 2015 5:46 pm
by Michael4771079
thats correct lllya,
the chickenpizza_item_label" and
price "chickenpizzaPricelabel are in a grid also, which in on collapsable header and collapsable component is in the chickenpizzamobilegrid and those labels save to the array, just not the radiobutton.
I also tried removing the radiobutton from it grid on the content area and just placed it on the collapsable content area and got the same result, radiobutton value wont save with my code.see screenshot
Is my code correct lllya
saving radiobuttongroup value
Posted: Fri Apr 03, 2015 5:46 pm
by Michael4771079
saving radiobuttongroup value
Posted: Fri Apr 03, 2015 7:29 pm
by Illya Stepanov
Your code is correct for collapsable header, but for the content part you will need to use another code.
saving radiobuttongroup value
Posted: Fri Apr 03, 2015 7:32 pm
by Michael4771079
can you tell me what code I would need?
The reason im using this radiobutton is that the code I used in last build for toggle could not be used so with this upgrade I had to change component, im just trying to rebuild what was already built
saving radiobuttongroup value
Posted: Fri Apr 03, 2015 8:13 pm
by Illya Stepanov
Is your app shared with us, could you please remind its name?
saving radiobuttongroup value
Posted: Fri Apr 03, 2015 8:29 pm
by Michael4771079
Yes lllya,
app is shared, "anglo pizza"
page is anglokebabs,
grid and collapsible is the last on page (the only one uncollapsed)
if you need to login to app
click green anglo btn at bottom of page
scroll down and use "a" for login and pass
click new order and select kebabs from menu
localstorage variable is kebabArray
thanks for the help, much appreciated