This topic is locked
[SOLVED]

 Modify "Send an email to selected users"

1/20/2019 9:31:28 PM
PHPRunner General questions
K
keithh0427 author

I'm using the "Send an email to selected users" example in the manual and I'm having difficulty with one portion. I'd like to change one of the text boxes to a radio button and I'm not having any luck getting it's value.
I began by using the code below:

if ( proxy["Certificates"] === true ) {

params["includePC"] = proxy["includePC"];

proxy["Certificates"] = false;

return true;

}

weekendID = document.getElementById('value_weekendID_26').value;



var selBoxes = pageObj.getSelBoxes( pageid ),

args = {

modal: true,

header: "Create Angel Tags",

html: '<div><p>Include PC name(s) in Certificate?</p><input type="radio" name="includePC" value="no" checked> No <input type="radio" name="includePC" value="yes"> Yes</div>',

footer: '<a href="#" id="CertificatesNext" class="btn btn-primary">' + Runner.lang.constants.TEXT_NEXT + '</a>'

+ '<a href="#" id="CertificatesCancel" class="btn btn-default">' + Runner.lang.constants.TEXT_CANCEL + '</a>',

afterCreate: function( win ) {

$("#CertificatesNext").on("click", function( e ) {

var context = win.body();



proxy["Certificates"] = true;

proxy["includePC"] = $("#includePC", context).val();

$('[id="' + ctrl.id + '"]').click();

window.open("prnt_Certificates.php?weekendID="+weekendID, "_blank");

e.preventDefault();

});



$("#CertificatesCancel").on("click", function( e ) {

e.preventDefault();

win.destroy();

});

}

};



if ( selBoxes.length == 0 || !confirm('Do you really want to create Certificates for these sacraments?') ) {

return false;

}



Runner.displayPopup( args );

return false;


How can I get the value of the radio button?

K
keithh0427 author 1/21/2019

I've got it working by switching the radio buttons with a select option