Events Made Easy Forums Bug fixed or feature request implemented Condition in the Registration form

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #52100
    Anonymous
    Inactive

    Hi Franki
    I have been testing the plugin and it works great so far. Keep up the good work.
    I would however like to add in a condition in the Registration form. Let me try and explain.
    When the invite is sent, an invite/event code is part of the email. EG: Event03
    Now when the invitee responds and completes the online event registration they must enter this invite/event code with rest of the details.
    If the invite/event code is correct then it should do the booking else reject it.
    The invite/even codes will differ per event.
    The CAPTCHA method must still also be available.

    I have searched the forum but can find anything related to this. I am sure it something very easy to do, just not finding the answer. I am sure that the Hooks And Filters is the place to start, but not quite sure how.

    #52102
    Franky
    Keymaster

    I’m guessing you need to use a custom field (to ask for the code) and then use the filter eme_eval_booking_form_filter to evaluate.
    See http://www.e-dynamics.be/wordpress/?cat=44 and http://www.e-dynamics.be/wordpress/?cat=41

    #52117
    Anonymous
    Inactive

    Hi Franki

    Thanks for that feedback. I am no developer but do can some of the basic stuff. I have added the lines below to the themes function.php but get an error message that 2 arguments are missing. I am also am not sure what to add between {….} to do the check. Can you please give some advise?

    I have create a form filed eventid (this is id 3) to do the validation

    add_action(’eme_eval_booking_form_filter’,’do_my_stuff’);
    function do_my_stuff($event, $booker) {
    }

    #52120
    Franky
    Keymaster

    Example:

    add_action(‘eme_eval_booking_form_filter’,’do_my_stuff’);
    function do_my_stuff($event, $booker) {
        // show all input
        // print_r($_POST);
        if ($_POST['the field i want'] == 'the value') {
           // eval is success
           return array(0=>1,1=>'');
        } else {
           // bad form entry
           return array(0=>0,1=>'try something else');
        }
    }
    #52147
    Anonymous
    Inactive

    Hi Franki

    Thanks for this. It works so cool and displays the message as expected. There is however a problem I don’t seem to find why?
    I get a message the flashes with the post info
    “Warning: Missing argument 2 for do_my_stuff() in /home/theme/….. on line 26.”…..but it works as expected.

    Note: This option works fine, but it means that all events will have the same eventcode or I have to edit the the above code regularly.
    My requirements are that we send invites for specific events and mange them accordingly.
    Suggestion: Add an event code field where admin can enter a code. This make the event Code unique for each event and that can the be an external validation.

    #52148
    Franky
    Keymaster

    The event id is unique: $event['event_id'];

    I also found why you get that warning. I need to move the action hook in the code, for now it is executed before the $booker variable is completed, so it is an empty var. I’ll update that this evening.

    #52155
    Franky
    Keymaster
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top