Page 3 of 3

Adding more fields to the pre-set User database

Posted: Fri Oct 25, 2013 6:10 pm
by Scott Schechtel6280324

I need the value to be the selected VISA or Mastercard option.


Adding more fields to the pre-set User database

Posted: Fri Oct 25, 2013 7:51 pm
by Kateryna Grynko

Hi Scott,

Here is the code:prevar radiogroup = Appery("mobileradiogroup_24").find("div.ui-radio");
var selected = "";
radiogroup.each(
function(e){
if ($(radiogroup[e]).find("label[data-icon=radio-on]") !== ""){
selected = $(radiogroup[e]).find("input").attr("value");
}
}
);/preAfter you run the code you have the selected radiobutton value in variable 'selected'. Please change mobileradiogroup_24 to your radiogroup component name.


Adding more fields to the pre-set User database

Posted: Fri Oct 25, 2013 8:24 pm
by Scott Schechtel6280324

Does this code go in Design view? Isn't it mobileradiogroup_18?


Adding more fields to the pre-set User database

Posted: Fri Oct 25, 2013 8:33 pm
by Scott Schechtel6280324

I added the code, changed to mobileradiogroup_18 and still getting 'true' as the value and not VISA.


Adding more fields to the pre-set User database

Posted: Fri Oct 25, 2013 8:47 pm
by Scott Schechtel6280324

Okay, figured it out. Thanks!!!


Adding more fields to the pre-set User database

Posted: Fri Oct 25, 2013 8:49 pm
by Kateryna Grynko

Scott,

Glad it's working!

Did you change .attr("value") to .text() ?