Changing dialog button text client-side

Posted by: daniel_fenn on 10 September 2017, 11:48 am EST

  • Posted 10 September 2017, 11:48 am EST


    I'm having some trouble that I'm hoping someone can help me with. I have a c1dialog box with some radio buttons and confirm/cancel DialogButtons, and I'd like to be able to change the text on the confirm button depending on which radio button is selected. This seems like it should be pretty straightforward, but I can't quite figure out how to do it. I've tried this (for the sake of clarity, I've removed the logic to determine what the new label should be):

    $("input:radio").live("click", function (args) {

    $('#' + dialogClientID).c1dialog({ button: [{ text: "NewText" }] });


    This just messes up the dialog box.

    Can anyone give me any suggestions?


  • Replied 10 September 2017, 11:48 am EST

    Hi Daniel,

    You should use 'buttons' option not 'button'. Please see the code below :

    $("input:radio").live("click", function () {
    $("#C1Dialog1").c1dialog({ buttons: [{ text: "Ok"}] });

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels