Edit in JSFiddle

 $(document).ready(function() {
    $('#widget-point').append(
      '<div id="xyz" data-widget data-locale="en" data-mode="signup" data-type="dual"></div>'
    );

    $('#xyz').each(function() {
      // appKey should replace your own RINGCAPTCHA appKey
      var appKey = "hy2o7ujafi5ene6o4y7a";
      var settings = $(this).data();
      settings.app = appKey;
      settings.events = {
        ready: function(event, formValues) {
          console.log("ready: event:", event);
          $('.btn.btn-submit.btn-block.btn-verify.register').html("Copy Form Code");
          $('h3').text("Sample GDPR form");
        },
        
        signup: function(event, formValues) {
          console.log("Signup: event:", event);
          console.log("Signup: formValues:", formValues);
          const dataString = localStorage.getItem('ringcaptcha.widget.' + appKey);
          const data = dataString ? JSON.parse(dataString) : null;
          console.log("Signup: data:", data);
          $('h3').text("Sample GDPR form");
          $('div.signup-status').text('Sign up succesful.');
          // Add JavaScript Callbacks
        }
      };

      settings.form = [
        {
          id: 'email',
          type: 'email',
          placeholder: 'Email',
          validations: {
            format: {
              message: 'Invalid email'
            }
          }
        },
        {
          id: 'firstname',
          type: 'text',
          placeholder: 'First Name',
          validations: {
            presence: {
              message: 'First Name should be present'
            }
          }
        },
        {
          id: 'lastname',
          type: 'text',
          placeholder: 'Last Name',
          validations: {
            presence: {
              message: 'Last Name should be present'
            }
          }
        },
        {
          id: 'phone',
          type: 'phone',
          placeholder: 'Phone',
          validations: {
            eu_citizens_gdpr: { 
            message: 'You must agree to the terms of General Data Protection Regulation (link to explanation)' 
            },
            length: { min: 5, max: 15, message: 'Invalid phone' }
          }
        },
        {
          id: 'gdpr',
          type: 'checkbox',
          checked: true,
          label: "Use this information to reach out and help me to 'Get Consent & Give Right-to-be-Forgotten'",
        },
      ];
      new RingCaptcha.Widget(this, settings.app, settings);
    });
  });