• I set up a few event questions under regform setup and set them to be required and left the value blank, but when I go to the form and click Submit, those fields do not get validated. It pass the blank value on with out an alert. Does anyone have a fix for this? I need attendees to select a t-shirt size (dropdown) and they also have to agree to a release form (single check box).

    Thanks-
    Rob

Viewing 9 replies - 1 through 9 (of 9 total)
  • Can you post the form?

    Thread Starter robanna

    (@robanna)

    solidariti,
    Not really – it’s private post on a live site.
    Maybe if you could PM me I could set up a use for you to go have a look at it. Do you think you’d have time?

    Thanks-
    Rob

    Hi,

    I’m having the same problem. I have a couple of custom fields, one of which is required, but I can submit the form without any messages. I have dissected the form validation javascript in the plugin PHP, but I’ve had no luck. I am using the out of the box files without modifications. The class for the form field is correct (class=”r”), but the javascript does not seem to execute properly on form submit.

    I am using WordPress 2.7.1 and viewing pages in Firefox 3.0.7. The issue also occurs in Safari 3.2.1

    I really need this to work, it’s an RSVP form for my brother’s wedding site

    Cheers,
    Chris

    My apologies on this. There is a bug with adding additional questions and validation that I have not yet been able to resolve. I am working on this and hope to have it resolved very soon.

    Does anyone know if this is this resolved in the new version?

    Any luck on this validation issue avdude?

    I have a fix for this:

    --- event-registration/event_register_attendees.inc.php-orig 2009-05-05 22:23:41.000000000 +0000
    +++ event_register_attendees.inc.php-new      2009-05-11 11:13:24.000000000 +0000
    @@ -204,11 +204,14 @@
            return null;
     }
    
    +
                    //alert("your trying to submit");
    -               var inputs = $A(form.getElementsByTagName("input"));
    +               var inputs = form.getElementsByTagName("input");
                    var msg = "";
    -               var radioChecks = $H();
    -               inputs.each( function(e) {
    +               var radioChecks = new Array();
    +               var e;
    +               //inputs.each(
    +               for( var i = 0, e; e = inputs[i]; i++ ) {
                            var value = e.value ? trim(e.value) : null;
                            if (e.type == "text" && e.title && !value && e.className == "r") {
                                    msg += "\n " + e.title;
    @@ -218,16 +221,20 @@
                                    if (e.type == "checkbox") name = name.substr(0, name.lastIndexOf("-"));
                                    if (e.checked == false && ((!radioChecks[name]) || (radioChecks[name] && radioChecks[name] != 1))) {
                                            radioChecks[name] = e;
    +                                       //alert("your trying to submit " + name + "title:" + e.title);
                                    } else {
                                            radioChecks[name] = 1;
                                    }
                            }
    -               });
    -               radioChecks.each( function(e) {
    -                       if (typeof(e) == "object" && e.value != 1) {
    -                               msg += "\n " + e.value.title;
    +               }
    +
    +               for (var name in radioChecks) {
    +                       var e = radioChecks[name];
    +                       if (typeof(e) == "object" && e != 1) {
    +                               msg += "\n " + e.title;
                            }
    -               });
    +               }
    +
                    if (msg.length > 0) {
                            msg = "The following fields need to be completed before you can submit.\n\n" + msg;
                            alert(msg);

    Looks like the backticks still mangled the patch. Try replacing the ampersands as appropriate….

    I have posted a valid fix for the validation that works. It is at https://edgetechweb.com/registration-form-validation/

    additionally I have written more detail instructions and provided better screen shots.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Event Registration] Required registration questions not validated’ is closed to new replies.