Page 3 of 3

c15r error with checkbox

Posted: Fri Feb 27, 2015 10:49 pm
by Michael4771079

Hi Yurri,
thanks for you time on this,
maybe I didn't explain correctly.
Have a look at this s/s
1 is orderlabel,
2 is hampizzaPricelabel

Image

On the radio button the "TexT" is 9 Inch "Value" is £5.00

Image

When page loads a service is mapped to the grid, and on this screen there it prints 5 grids and collapsibles,
s/s attached

Image

Image


c15r error with checkbox

Posted: Fri Feb 27, 2015 10:53 pm
by Michael4771079

when user click an option from radiobuttongroup the selection is printed in the orderlabel and hampizzaPricelabel for the collapsible it was clicked in


c15r error with checkbox

Posted: Fri Feb 27, 2015 10:57 pm
by Michael4771079

Here is the desired result.
Hope this helps.

BEST!

Image


c15r error with checkbox

Posted: Fri Feb 27, 2015 11:01 pm
by Michael4771079

CORRECTION
"when user clicks an option from radiobuttongroup the selection is to be printed in the orderlabel and hampizzaPricelabel for the collapsible it was
clicked in "


c15r error with checkbox

Posted: Tue Mar 03, 2015 4:05 am
by Yurii Orishchuk

Hi Michael,

Yes it was not clear.

But this time seems to be ok.(you need on click by radiobutton - move this radio item visible value to that label)

Here is code for this goal:

pre

console.log(this);
var currentText = jQuery(this).text();

//Current collapsibleset item.
var currentCollapsible = jQuery(this).closest('[data-role="collapsible"]');
//orderlabel in the current collapsible set item.
var orderlabel = currentCollapsible.find('[name="orderlabel"]');

orderlabel.text(currentText);

/pre

Please try it currently in your app by clicking on 14inch ... item.

Regards.


c15r error with checkbox

Posted: Thu Mar 05, 2015 12:44 am
by Michael4771079

Hi Yurri,
the code above works great,
I tried to adjust it to get the value of the radiobutton on click event with the following code but my alteration didnt work

codeconsole.log(this);
var currentVal = jQuery(this).val();
//Current collapsibleset item.
var currentCollapsible = jQuery(this).closest('[data-role="collapsible"]');
//orderlabel in the current collapsible set item.
var hampizzaPricelabel = currentCollapsible.find('[name="hampizzaPricelabel"]');
hampizzaPricelabel.val(currentVal);
/code


c15r error with checkbox

Posted: Thu Mar 05, 2015 7:25 am
by Egor Kotov6832188

Hello Michael.

Try next:
var hampizzaPricelabel = currentCollapsible.find('input:checked');
hampizzaPricelabel.siblings('label').text("New val");


c15r error with checkbox

Posted: Thu Mar 05, 2015 2:03 pm
by Michael4771079

Hi Egor,
Thanks for the reply

I tried the code but no luck, here are some screenshots
I ran the code on click radiobuttion "14 Inch" and "12 Inch stuffed crust

The value does not print when I click the radiobuttons, and if I click 14 inch and then 12 inch stuffed crust no values print and the text on the radio button changes.
See screenshots.
No errors in console

Image
Image

Image


c15r error with checkbox

Posted: Thu Mar 05, 2015 5:12 pm
by Michael4771079

HI,can I just add,
none of the code works on the iphone,
I scan the qr code iphone 5 7.02 the code from Yurri or Egor dont seem to fire

They work as described above in the browser

Thanks


c15r error with checkbox

Posted: Mon Mar 09, 2015 1:24 am
by Yurii Orishchuk

Hi Michael,

Please use "Change value" event instead of "Click".

Regards.